Problems about generating dynamic library using mipsisa32-elf target toolchain
Richard Sandiford
rsandifo@redhat.com
Wed May 19 14:42:00 GMT 2004
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
More information about the Binutils
mailing list