A patch for elf32.em (Re: GNU/Linux vs. libtool --no-undefined)
Ian Lance Taylor
ian@zembu.com
Tue Feb 6 19:02:00 GMT 2001
"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
More information about the Binutils
mailing list