From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3499 Path: news.gmane.org!not-for-mail From: Justin Cormack Newsgroups: gmane.linux.lib.musl.general Subject: Re: dlinfo Date: Sat, 29 Jun 2013 17:43:12 +0100 Message-ID: References: <20130629155359.GJ29800@brightrain.aerifal.cx> <20130629163117.GL29800@brightrain.aerifal.cx> <20130629163935.GM29800@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b339d1ff845c704e04db0ee X-Trace: ger.gmane.org 1372524204 19009 80.91.229.3 (29 Jun 2013 16:43:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Jun 2013 16:43:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3503-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 29 18:43:26 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UsyFB-0008Oy-Pg for gllmg-musl@plane.gmane.org; Sat, 29 Jun 2013 18:43:25 +0200 Original-Received: (qmail 11600 invoked by uid 550); 29 Jun 2013 16:43:25 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11585 invoked from network); 29 Jun 2013 16:43:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specialbusservice.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=kRBxs97EBTEoMhP9iDwL5/aSBMWiwWlNz/F9G/aJwfg=; b=aXNIvPzIzmFQskErl8F6lfMicX8Y0ukENzQ5HfrUto+ZxvRQ1JpGP4gjFWLzvHuQ/d BW9F5lv6jjXd/gQ/Rv5/6JH79nTSx+wOAhI2ZdeI/uXQXZPFPA2n9AyEBabe6L5VhfAI e9Vu4smV3p48wf8zbAYpa1jgf7P3aVYtNEe84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=kRBxs97EBTEoMhP9iDwL5/aSBMWiwWlNz/F9G/aJwfg=; b=jIhNSEMQTQyXVpZ8naDdupfIiyRgvK1SFNLL/j5LurckncGhFokAGVFnI4TE0UK7E3 FPgP0QjmQ3EMpkQhNgaIPLaXN3bH6ct4pxEgfsGGhHExHitPZlvWrl3FR+HRmCiURvKe b/QwPJfUFZeh3IuztzxXP4XoPjBq0Bx2aaQwN/FiCa2FHaEkubqUtnPj+0+u7qGkCo9d AJ1TrKiNRoN1hG4ZSApOvkS6RW0vfK1jYL65emUy6hBVyxKzSB629H7vQWlMvqASeRgK rsCbgDWU9QP3FJH+TFfO/2ph8RLBWUWvghxr+inR7VI4MYEfSCdZGc7WwBhulmVD4wjP qKZw== X-Received: by 10.68.240.72 with SMTP id vy8mr16538998pbc.161.1372524192998; Sat, 29 Jun 2013 09:43:12 -0700 (PDT) In-Reply-To: <20130629163935.GM29800@brightrain.aerifal.cx> X-Gm-Message-State: ALoCoQnOUarAz7W2a+awRNKdSMxfGStg8VQ8VF2CsV+XggsYtHkDj1be+ftm9/VQXW7EPhO05N3J Xref: news.gmane.org gmane.linux.lib.musl.general:3499 Archived-At: --047d7b339d1ff845c704e04db0ee Content-Type: text/plain; charset=UTF-8 On 29 Jun 2013 17:39, "Rich Felker" 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 --047d7b339d1ff845c704e04db0ee Content-Type: text/html; charset=UTF-8


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

--047d7b339d1ff845c704e04db0ee--