This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Add STB_SECONDARY support
On Tue, Jul 03, 2012 at 05:18:42PM -0700, H.J. Lu wrote:
> 0x0000000000000001 (NEEDED) Shared library:
> [libbfd-2.22.52.20120703.so]
> 0x0000000000000001 (NEEDED) Shared library: [libz.so.1]
> 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
> 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
>
> libbfd-2.22.52.20120703.so is linked against libiberty.a. When you build
> binutils, libbfd will include a backup copy of standard functions
> which don't exist
> in libc.so at the time when you compile it. Even after you upgrade your
> libc.so with the latest and greatest standard functions, ld stiil uses
> the backup one from libiberty since ld.so searches libbfd.so before
> libc.so.6.
Like I said, I'm sure you could devise a way to put your backup
functions in another shared library that is searched after libc.so.6
That's dead easy. Deeper nesting of shared libraries is a little more
difficult, due to breadth first library search, but still possible for
any given depth of libraries. I imagine this case would be rare
anyway.
Who really is pushing for STB_SECONDARY? Is it some hide-bound
company that uses a non-ELF toolchain and doesn't want to adapt any
process of theirs?
--
Alan Modra
Australia Development Lab, IBM