This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Binutils linker bug?
Date: Tue, 9 Nov 1999 14:46:57 +1100
From: Geoff Keating <geoffk@ozemail.com.au>
> Are you suggesting that the program linker should reject an attempt to
> use a symbol from a shared library which is only included indirectly?
> That would break existing systems. For example, on Solaris, the
> shared X library includes other libraries. If we rejected references
> to shared libraries included indirectly, people would no longer be
> able to simply link against -lX11. This would also be incompatible
> with the Solaris linker.
I am suggesting exactly this. I just checked, and the solaris 2.5.1
linker does what I am suggesting:
Hmmm, I guess I misremembered about the Solaris linker.
As I recall, I put in the indirect referencing stuff at the request of
Roland McGrath for glibc. It's been in there since 1995, and I'm a
bit reluctant to take it out now.
Let's go back to why it's a bad idea. You're right that it can permit
a link to succeed which can then break if a shared library is changed.
But, after all, that is always true: any link can break if a shared
library is changed. Why is this different?
Ian