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: --as-needed handling of shared libraries that fail -Wl,-z,defs


On Fri, May 20, 2005 at 12:02:25PM +0200, Jakub Jelinek wrote:
> On Fri, May 20, 2005 at 07:23:49PM +0930, Alan Modra wrote:
> > On Thu, May 19, 2005 at 06:37:16PM +0200, Jakub Jelinek wrote:
> > > --as-needed doesn't seem to try satisfy undefined references in shared
> > > libraries:
> > 
> > No, as the ld doc says it "causes DT_NEEDED tags to only be emitted
> > for libraries that satisfy some symbol reference from regular objects
> > which is undefined at the point that the library was linked."
> 
> Ok, fine, no problem with that.  But in that case we should issue
> an error about unsatisfied references.

Yes.  The code needs rewriting to do that.  The trouble is that the
symbol table state isn't restored back to what is was before loading the
as-needed lib.  See the comment above elflink.c:elf_smash_syms.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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