This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using linker scripts with dlopen


On Thu, 2011-07-28 at 14:54 +0200, Carmelo AMOROSO wrote:
> On 27/07/2011 1.18, Howard B. Golden wrote:
> > 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.
> The linker script are used when building, not at runtime
> when shared libraries are loaded. So dlopen("/usr/lib/libc.so") is
> simply wrong.

Respectfully, there is another use case: In interpreters there is no
separate build phase, so dynamic loading makes sense for these
situations. This is where my patch is applicable. I'm open to any
suggestions for a better approach.

Howard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]