This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question about archive search behavior vs. --defsym
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 08 Sep 2010 23:55:42 -0700
- Subject: Re: Question about archive search behavior vs. --defsym
- References: <4C88682B.5030306@codesourcery.com> <mcrocc7e8x1.fsf@google.com>
On 9/8/2010 11:19 PM, Ian Lance Taylor wrote:
>> $ gcc main.c -Wl,--defsym=f=4 -L. -lf
>>
>> pulls in f.o from libf.a even though the symbol is already defined.
> It's a phase ordering problem. Objects are pulled in from archives
> before symbol assignments are processed.
> I think this has to be considered a bug.
OK. Is this a structurally hard thing to fix? Or just something that
would take some effort? And, does GOLD handle this correctly?
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713