behavior of weak definitions in archive libraries
David Mosberger
davidm@napali.hpl.hp.com
Tue Nov 11 23:12:00 GMT 2003
>>>>> On 11 Nov 2003 17:33:36 -0500, Ian Lance Taylor <ian@wasabisystems.com> said:
Ian> This behaviour is intentional for ELF. That is how ELF linkers work.
>> From http://www.caldera.com/developers/gabi/1998-04-29/ch4.symtab.html
Ian> When the link editor searches archive libraries [see ``Archive
Ian> File'' in Chapter 7], it extracts archive members that contain
Ian> definitions of undefined global symbols. The member's definition
Ian> may be either a global or a weak symbol. The link editor does not
Ian> extract archive members to resolve undefined weak symbols.
Ian> Unresolved weak symbols have a zero value.
I guess I can see why doing it the other way would come with its own
set of problems. Nasty...
OK, so the bug must be in the library then.
Thanks for quick response!
--david
More information about the Binutils
mailing list