This is the mail archive of the binutils@sources.redhat.com 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: RFC: linker enhancements


On Wed, Mar 17, 2004 at 10:41:49PM +1030, Alan Modra wrote:
> On Wed, Mar 17, 2004 at 07:31:16AM +0100, Jakub Jelinek wrote:
> > > One side-effect of this patch is that when --only-if-needed is in
> > > effect, weak definitions in normal files won't be overridden by
> > > a strong definition in a shared library.  I'm not sure whether that's
> > > a bug or a feature..
> > 
> > Only if the library is not included, or when it is actually needed as well?
> 
> Potentially both cases.  elf_link_add_object_symbols won't use a strong
> definition in the lib in preference to a weak definition in a regular
> file until some other definition is needed from the library.  At that
> point, further weak definitions in regular objects will be overridden.

Do you have a testcase for that? I think the current linker will never
let any definition from a shared libray override a weak definition in
a regular file.



H.J.


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