* dlinfo
@ 2013-06-29 15:40 Justin Cormack
2013-06-29 15:53 ` dlinfo Rich Felker
0 siblings, 1 reply; 9+ messages in thread
From: Justin Cormack @ 2013-06-29 15:40 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 54 bytes --]
Has anyone got any plans to implement dlinfo?
Justin
[-- Attachment #2: Type: text/html, Size: 92 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 15:40 dlinfo Justin Cormack
@ 2013-06-29 15:53 ` Rich Felker
2013-06-29 16:14 ` dlinfo Justin Cormack
0 siblings, 1 reply; 9+ messages in thread
From: Rich Felker @ 2013-06-29 15:53 UTC (permalink / raw)
To: musl
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.
Rich
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 15:53 ` dlinfo Rich Felker
@ 2013-06-29 16:14 ` Justin Cormack
2013-06-29 16:31 ` dlinfo Rich Felker
0 siblings, 1 reply; 9+ messages in thread
From: Justin Cormack @ 2013-06-29 16:14 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
On 29 Jun 2013 16:54, "Rich Felker" <dalias@aerifal.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.
> Rich
Justin
[-- Attachment #2: Type: text/html, Size: 781 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 16:14 ` dlinfo Justin Cormack
@ 2013-06-29 16:31 ` Rich Felker
2013-06-29 16:34 ` dlinfo Justin Cormack
0 siblings, 1 reply; 9+ messages in thread
From: Rich Felker @ 2013-06-29 16:31 UTC (permalink / raw)
To: musl
On Sat, Jun 29, 2013 at 05:14:16PM +0100, Justin Cormack wrote:
> On 29 Jun 2013 16:54, "Rich Felker" <dalias@aerifal.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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 16:31 ` dlinfo Rich Felker
@ 2013-06-29 16:34 ` Justin Cormack
2013-06-29 16:39 ` dlinfo Rich Felker
0 siblings, 1 reply; 9+ messages in thread
From: Justin Cormack @ 2013-06-29 16:34 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]
On 29 Jun 2013 17:31, "Rich Felker" <dalias@aerifal.cx> wrote:
>
> On Sat, Jun 29, 2013 at 05:14:16PM +0100, Justin Cormack wrote:
> > On 29 Jun 2013 16:54, "Rich Felker" <dalias@aerifal.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
Thanks!
[-- Attachment #2: Type: text/html, Size: 1659 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 16:34 ` dlinfo Justin Cormack
@ 2013-06-29 16:39 ` Rich Felker
2013-06-29 16:43 ` dlinfo Justin Cormack
0 siblings, 1 reply; 9+ messages in thread
From: Rich Felker @ 2013-06-29 16:39 UTC (permalink / raw)
To: musl
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 16:39 ` dlinfo Rich Felker
@ 2013-06-29 16:43 ` Justin Cormack
2013-06-29 16:48 ` dlinfo Rich Felker
0 siblings, 1 reply; 9+ messages in thread
From: Justin Cormack @ 2013-06-29 16:43 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1155 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 16:43 ` dlinfo Justin Cormack
@ 2013-06-29 16:48 ` Rich Felker
2013-06-30 9:00 ` dlinfo Justin Cormack
0 siblings, 1 reply; 9+ messages in thread
From: Rich Felker @ 2013-06-29 16:48 UTC (permalink / raw)
To: musl
On Sat, Jun 29, 2013 at 05:43:12PM +0100, Justin Cormack wrote:
> 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.
OK. It's implemented but untested. Take a look at current git and see
if it meets your needs.
Rich
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: dlinfo
2013-06-29 16:48 ` dlinfo Rich Felker
@ 2013-06-30 9:00 ` Justin Cormack
0 siblings, 0 replies; 9+ messages in thread
From: Justin Cormack @ 2013-06-30 9:00 UTC (permalink / raw)
To: musl
On Sat, Jun 29, 2013 at 5:48 PM, Rich Felker <dalias@aerifal.cx> wrote:
> On Sat, Jun 29, 2013 at 05:43:12PM +0100, Justin Cormack wrote:
>> 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.
>
> OK. It's implemented but untested. Take a look at current git and see
> if it meets your needs.
Haven't been able to test yet as I have further build issues, will
report back later...
Thanks very much
Justin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-06-30 9:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-29 15:40 dlinfo Justin Cormack
2013-06-29 15:53 ` dlinfo Rich Felker
2013-06-29 16:14 ` dlinfo Justin Cormack
2013-06-29 16:31 ` dlinfo Rich Felker
2013-06-29 16:34 ` dlinfo Justin Cormack
2013-06-29 16:39 ` dlinfo Rich Felker
2013-06-29 16:43 ` dlinfo Justin Cormack
2013-06-29 16:48 ` dlinfo Rich Felker
2013-06-30 9:00 ` dlinfo Justin Cormack
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).