[BUG] ld behavior varies for C++ static initializer depending on .a or .o input

Ulrich Drepper drepper@redhat.com
Sun Apr 13 23:26:00 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Zack Weinberg wrote:

> I'd like to point out that while this is true for static (.a)
> libraries, it is not true for shared (.so) libraries -- the linker
> generates DT_NEEDED entries for every shared library on the command
> line, whether or not they satisfy undefined symbols.  Personally I
> consider this a bug.

Agreed, I argued like that for years.  If somebody wants the DSO
included s/he can use -u to create and artificial dependency.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+mfH72ijCOnn/RHQRAtHmAKCnq3OcfkKWRnvmmZI9cyTLCzkeGgCfej6g
ZErCJSskzy+8TJD3Ld+CWos=
=9jUv
-----END PGP SIGNATURE-----



More information about the Binutils mailing list