This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problems about generating dynamic library using mipsisa32-elftarget toolchain
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: Jie Zhang <zhangjie at magima dot com dot cn>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 19 May 2004 15:42:32 +0100
- Subject: Re: Problems about generating dynamic library using mipsisa32-elftarget toolchain
- References: <40AB3121.5000807@magima.com.cn>
Jie Zhang <zhangjie@magima.com.cn> writes:
> I have problems about generating dynamic library using mipsisa32-elf
> target toolchain,
Why are you using mipsisa32-elf? It's not really designed to handle
dynamic libraries. You're much better off with a toolchain for your
target OS (*-linux-gnu, or whatever).
> For the following simple code:
>
> /* t.c */
> extern void bar ()
>
> void foo ()
> {
> bar ();
> }
>
> > mipsisa32-elf-gcc -fpic -c t.c
Yeah, mipsisa32-elf defaults to the EABI, which has no support for PIC.
If you want SVR4 PIC, you should instead use:
mipsisa32-elf-gcc -mabi=32 -mabicalls -c t.c
Richard