On Sat, 31 May 2008 02:17:15 +0200
Luca Barbato <[EMAIL PROTECTED]> wrote:
> Ciaran McCreesh wrote:
> > Linking with as-needed is the stage in which the elimination occurs,
> > and as-needed is the cause of the elimination. So yes, it is
> > related.
> 
> The linker just does bookkeeping, if there aren't symbols used, the 
> library won't be in the list.

Which is where the design flaw is -- as-needed incorrectly assumes that
the only type of dependency between shared objects is a name
dependency. This isn't true with C++ static initialisers.

> >> Still, PE and ELF are older than the first C++ spec so, IFF your
> >> reading of this chapter is correct, C++ is broken by design.
> > 
> > Not at all. Read "The Design and Evolution of C++", and you shall
> > see that requiring changes to the linker where necessary for
> > sensible behaviour was considered acceptable, and with good reason.
> 
> As in "we have a square wheels, let's make routes for them"...

More like "getting the linker right is important enough to us that
we'll pester people to make their wheels at least octagonal rather than
the current square". Unfortunately, as-needed is moving back to square.

> Anyway is the book a standard? Is it available as pdf so you can
> point me the exact paragraph?

The book is an explanation of why the standard is the way it is. You
can find it at your local library.

Whilst we're on the subject... You'll note that as-needed overrides
explicit instructions from the programmer. When you say "link A to B",
you aren't say "link A to B unless you feel like not doing the link".
Unfortunately, the ricers shoving as-needed upon everyone aren't smart
enough to fix libtool, which is the real problem here, so they go for
the thing they think they understand instead, without thinking the
implications through -- as-needed, like fast-math, is for programs
explicitly designed for it, not for universal use.

-- 
Ciaran McCreesh

Attachment: signature.asc
Description: PGP signature

Reply via email to