--as-needed by default
Alexandre Oliva
aoliva@redhat.com
Tue Mar 8 17:13:00 GMT 2005
On Mar 3, 2005, Zack Weinberg <zack@codesourcery.com> wrote:
> I've argued in the past for --as-needed to be the default, because it
> makes shared library semantics match static library semantics,
In what sense? I can come up with numerous examples in which it still
wouldn't match. In fact, in *most* cases it still wouldn't match. I
can't however figure out what particular example would make them
match.
> and because it takes a quite contrived application to depend on
> DT_NEEDEDs for libraries that satisfy no symbols.
Not really. Consider a library libfoo that is linked with libbar not
because it uses symbols from libbar, but because libbar used to be
part of its API before the code was split into a separate library.
Dropping libbar from libfoo's DT_NEEDED would break programs linked
with libfoo, and even force libfoo to change its SONAME.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
More information about the Binutils
mailing list