This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
R_MIPS_32 handling
- From: Ryan Mansfield <rmansfield at qnx dot com>
- To: binutils at sourceware dot org
- Date: Wed, 26 Aug 2009 15:58:03 -0400
- Subject: R_MIPS_32 handling
- Reply-to: rmansfield at qnx dot com
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