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 by default


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}


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