Date: Sat, 29 Jun 2013 12:31:17 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: dlinfo On Sat, Jun 29, 2013 at 05:14:16PM +0100, Justin Cormack wrote: > On 29 Jun 2013 16:54, "Rich Felker" <dalias@...ifal.cx> wrote: > > > > On Sat, Jun 29, 2013 at 04:40:17PM +0100, Justin Cormack wrote: > > > Has anyone got any plans to implement dlinfo? > > > > I'm not opposed to it, but not sure how easy it would be. > > RTLD_DI_LINKMAP looks trivial (just return the argument passed in), > > but the origin and search information is stuff that's probably not > > saved with the current dynamic linker implementation. > > Linkmap is the only bit I need actually. NetBSD apparently only implements > that and not the rest, so it is not unprecedented. 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. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.