-Wl,--as-needed

Ralf Corsepius rc040203 at freenet.de
Fri Jun 30 05:21:57 PDT 2006


On Fri, 2006-06-30 at 13:42 +0200, Axel Thimm wrote:
> On Fri, Jun 30, 2006 at 11:47:29AM +0200, Ralf Corsepius wrote:
> > On thing I know for sure is --as-needed having occasionally failed due
> > to bugs somewhere.
> 
> > ATM, IMO, --as-needed is a promise and probably works in many cases,
> > but ... one counter example (which I am 99% sure can be found - I one
> > had a code example, I don't have anymore) suffices to prove it as "too
> > unreliable".
> 
> What happens when it fails?
Sorry, I don't recall the details (All this took place several years
ago).

IIRC, it had been plain linker breakdowns during linkage and "weird
run-time behavior at program startup" (symbol table corruption). I don't
know if things have stabilized sufficiently since then.

Another issue I recall, was people applying --as-needed to libraries
when combing several shared libs and interaction with --whole-archive
(Debian policy is to use --whole-archive on shared libs, i.e. the
contrary to what Fedora is tempted to do.)

Yet another issue is portability: --as-needed is non-portable.

>  Do you get all unnecessary dependendencies
> back in (which would not be worse than what there is there today), or
> do you suddenly start missing true dependencies?

Ralf





More information about the Apt-Rpm mailing list