R_MIPS_32 handling
Ryan Mansfield
rmansfield@qnx.com
Wed Aug 26 20:49:00 GMT 2009
Hi,
I have a testcase that has a R_MIPS_32 in a .rel.debug_info against an
externally defined symbol. Since .debug_info is non-alloc, ld isn't
able to convert it into a dynamic reloc and create the shared object.
Can anyone comment on how this reloc should be handled?
Reduced testcase:
$ cat /home/ryan/efun.c
extern void err (int, const char *, ...);
static void (*efunc)(int, const char *, ...) = err;
$ mips-unknown-linux-uclibc-gcc -O ~/efun.c -g -fpic -shared
/home/ryan/tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/bin/ld:
non-dynamic relocations refer to dynamic symbol err
/home/ryan/tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/bin/ld:
failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
Regards,
Ryan Mansfield
More information about the Binutils
mailing list