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]

Re: binutils 2.19.92 linker broke with --as-needed flag


Alan Modra <amodra@gmail.com> writes:
> On Mon, Feb 04, 2013 at 05:58:37PM -0800, Vincent Wen wrote:
>> The linker broke when as-need flag is added.
>> 
>>  /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_'
>
> I think mips was broken before --as-needed.  mips seems to want a
> dynamic _GLOBAL_OFFSET_TABLE_ symbol in shared libs, presumably for
> use by ld.so.

Yeah, I've no idea why that mips does what it does.  GNU ld.so uses
DT_PLTGOT to find and relocate the GOT, as you'd hope.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]