This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: A patch for elf32.em (Re: GNU/Linux vs. libtool --no-undefined)
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: A patch for elf32.em (Re: GNU/Linux vs. libtool --no-undefined)
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 06 Feb 2001 19:00:40 -0800
- Cc: Fergus Henderson <fjh at cs dot mu dot oz dot au>, binutils at sourceware dot cygnus dot com
- References: <20010205211708R.mitchell@codesourcery.com><jebssgkl77.fsf@hawking.suse.de><20010207024456.A10994@venus.cs.mu.oz.au><jeu2673iwq.fsf@hawking.suse.de> <20010206112928.A29981@valinux.com><20010207120535.A25034@hg.cs.mu.oz.au><20010206171540.E5565@valinux.com>
"H . J . Lu" <hjl@valinux.com> writes:
> > Hmm, how about the following (completely untested) patch?
> >
> > - if (link_info.relocateable || link_info.shared)
> > + if (link_info.relocateable || (link_info.shared && ! link_info.no_undefined))
> Any comments?
I'm no longer completely convinced that the linker ought to do that
searching at all. I think I put it in because either Thomas Bushnell
or Roland McGrath asked for it, and I think Roland McGrath eventually
decided that he didn't need it. I don't think that Solaris does this
sort of searching at all.
In any case, doing this searching for a shared library seems
counterintuitive.
The original error appears to be warning about an undefined symbol
reference from a shared library. Is that so? If it is, then I think
the linker should be fixed to not warn about undefined references from
shared libraries, even when --no-undefined is used. We care whether
each reference is satisfied somewhere. I don't think we care whether
each shared library included in the link has all symbols satisfied.
Do we?
Ian