On 29 Jun 2013 17:39, "Rich Felker" <dalias@aerifal.cx> wrote:
>
> On Sat, Jun 29, 2013 at 05:34:46PM +0100, Justin Cormack wrote:
> > > As a quick workaround then:
> > >
> > > -D'dlinfo(x,y,z)=(*(struct link_map *)(z) = (void *)(x))'
> > >
> > > Kidding aside, I wouldn't actually recommend this, since you'd be
> > > encoding implementation internals (the fact that the dso handle is
> > > actually the link_map pointer) into the application, which could badly
> > > break if the implementation is ever changed. I'll just go ahead and
> > > add this limited version of dlinfo; look for it soon and ping me if
> > > you don't see it.
> >
> > Thanks!
>
> One more question: does RTLD_SELF need to work? That's a lot harder
> and uglier, as it requires extra asm for each arch...
>
> Rich

I don't think so.

Justin