This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Using linker scripts with dlopen
On 27/07/2011 1.18, Howard B. Golden wrote:
> Hi,
>
> On Gentoo Linux, many important shared libraries are represented by linker scripts rather than the actual library. For GHC Haskell, I created a patch (see http://hackage.haskell.org/trac/ghc/ticket/2615) that looks beyond the linker script when a dlopen attempts to load the shared object and gets a linker script instead. Recently, I noticed that this code has been adopted by others for different languages. This got me thinking that there might be some interest in incorporating this feature directly into libc.
>
> Please let me know if there is any interest and I will send a patch.
>
> Cheers,
>
> Howard B. Golden
> Northridge, California, USA
>
>
The linker script are used when building, not at runtime when shared
libraries are loaded. So dlopen("/usr/lib/libc.so") is simply wrong.
cheers