This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, Attached are two patches regarding a bug with --as-needed on mips that causes the following error when using --as-needed (example for a small test program): /bin/sh ../libtool --tag=CC --mode=link mipsel-linux-gcc -I../include -g -O2 -Wl,--as-needed -o test-example test.o ../lib/libTestGcc.la libtool: link: mipsel-linux-gcc -I../include -g -O2 -Wl,--as-needed -o .libs/test-example test.o ../lib/.libs/libTestGcc.so -Wl,-rpath -Wl,/usr/local/lib ../lib/.libs/libTestGcc.so:(.got+0x0): multiple definition of `_GLOBAL_OFFSET_TABLE_' collect2: ld returned 1 exit status The first patch fixes the bug by hiding _GLOBAL_OFFSET_TABLE_ in elfxx-mips.c . I know there was some concern that _GLOBAL_OFFSET_TABLE_ possibly needs to be dynamic on some mips setups (Eric mentioned SGI). It doesn't seem to be an issue on my setup but I thought I'd mention it here in case that comes up for someone. The second patch updates the ld mips elf tests to account for the change to _GLOBAL_OFFSET_TABLE_. I ran them using `make check' from an x86_64-linux host with target mipsel-linux-uclibc. Follows up on the thread started by Vincent Wen (Re: binutils 2.19.92 linker broke with --as-needed flag). For reference, see: original email: https://lists.gnu.org/archive/html/bug-binutils/2013-02/msg00016.html discussion: http://sourceware.org/ml/binutils/2013-03/msg00289.html discussion: http://sourceware.org/ml/binutils/2013-04/msg00004.html Based off of Hans-Peter Nilsson's Nov 2004 change to hide _GLOBAL_OFFSET_TABLE_ (see http://sourceware.org/ml/binutils-cvs/2004-11/msg00003.html). This is my first patch submission here, so I'm sure I got a few things wrong. Any feedback is greatly appreciated! =) Best regards, -- Gregory Fong
Attachment:
binutils-2.23.2-bfd-elfxx-mips.patch
Description: Binary data
Attachment:
binutils-2.23.2-ld-mips-elf_testsuite_updates.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |