unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
To: Daniel Walker <danielwa@cisco.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	Carlos O'Donell via Libc-alpha <libc-alpha@sourceware.org>,
	Pedro Alves <palves@redhat.com>,
	Conan C Huang <conhuang@cisco.com>,
	"Metzger, Markus T" <markus.t.metzger@intel.com>,
	Florian Weimer <fw@deneb.enyo.de>,
	Jeremy Stenglein <jstengle@cisco.com>,
	xe-linux-external@cisco.com
Subject: Re: [RFC PATCH 3/3] add r_debug multiple namespaces support
Date: Wed, 28 Jul 2021 13:04:42 -0700	[thread overview]
Message-ID: <CAMe9rOoVCWg+9c1nq9+HeA9uBkb8Hdu-kamczBHjaF+wciq5fw@mail.gmail.com> (raw)
In-Reply-To: <20210728190211.GJ1633923@zorba>

On Wed, Jul 28, 2021 at 12:02 PM Daniel Walker <danielwa@cisco.com> wrote:
>
> On Wed, Jul 28, 2021 at 10:14:41AM -0700, H.J. Lu wrote:
> > On Wed, Jul 28, 2021 at 8:44 AM Daniel Walker <danielwa@cisco.com> wrote:
> > >
> > > On Wed, Jul 28, 2021 at 08:15:10AM -0700, H.J. Lu wrote:
> > > > On Tue, Jul 27, 2021 at 11:14 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> > > > >
> > > > > On Tue, Jul 27, 2021 at 10:40 AM Daniel Walker <danielwa@cisco.com> wrote:
> > > > > >
> > > > > > On Fri, Jul 23, 2021 at 04:38:33PM -0700, H.J. Lu wrote:
> > > > > > > On Mon, Jun 29, 2020 at 2:49 AM Florian Weimer via Libc-alpha
> > > > > > > <libc-alpha@sourceware.org> wrote:
> > > > > > > >
> > > > > > > > * Carlos O'Donell via Libc-alpha:
> > > > > > > >
> > > > > > > > >>> I'm not sure it would work to version _r_debug, since the debugger
> > > > > > > > >>> is using DT_DEBUG and we only get to put one value in that
> > > > > > > > >>> .dynamic entry.
> > > > > > > > >>
> > > > > > > > >> The symbol version is needed to avoid problems due to copy relocations
> > > > > > > > >> if the symbol is referenced directly from the main program.  Without
> > > > > > > > >> that, the object could be truncated.  It's not a debugger
> > > > > > > > >> compatibility feature.
> > > > > > > > >
> > > > > > > > > Correct, but this violates *how* you're supposed to use _r_debug.
> > > > > > > >
> > > > > > > > If it is possible to link against it, we need to add the new symbol
> > > > > > > > version, in my opinion.
> > > > > > > >
> > > > > > > > > In the dynamic case it is different. The symbol should be looked up
> > > > > > > > > via DT_DEBUG only which always points to the library-local address
> > > > > > > > > of the data object (and the most recent version). In effect this
> > > > > > > > > bypasses the COPY relocation?
> > > > > > > >
> > > > > > > > How is this supposed to work if the dynamic linker does contain
> > > > > > > > DT_DEBUG?
> > > > > > > >
> > > > > > > > I only observe DT_DEBUG in PIE binaries, but since the dynamic loader is
> > > > > > > > mapped at a random address even for ET_EXEC main programs, there must be
> > > > > > > > some other mechanism to locate it.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Florian
> > > > > > > >
> > > > > > >
> > > > > > > I opened:
> > > > > > >
> > > > > > > https://gitlab.com/x86-psABIs/Linux-ABI/-/issues/2
> > > > > > >
> > > > > > > with a proposal to extend struct r_debug for libraries loaded with
> > > > > > > dlmopen,  I'd like to resolve it for the next releases of glibc, binutils
> > > > > > > and GDB.
> > > > > >
> > > > > >
> > > > > > I have an updated set of changes which add a new dynamic entry
> > > > > > DT_DEBUG_DLMOPEN, which was recommended by Carlos. We're still testing the
> > > > > > implementation. I'm open to support different implementations.
> > > >
> > > > Please send an email to gABI group:
> > > >
> > > > https://groups.google.com/g/generic-abi
> > > >
> > > > to add a new DT_XXX.   If it is impractical to add a new DT_XXX to gABI,
> > > > I propose DT_GNU_DEBUG:
> > > >
> > > > https://gitlab.com/x86-psABIs/Linux-ABI/-/issues/2
> > > >
> > > > to cover dlmopen and beyond.
> > > >
> > >
> > >
> > > The last time this was discussed I thought this was the gABI group. Someone had
> > > said gABI was getting taken over by glibc.
> >
> > There are 2 gABI groups:
> >
> > 1. OS independent gABI:
> >
> > https://groups.google.com/g/generic-abi
> >
> > 2. Linux/GNU specific extensions to gABI:
> >
> > https://sourceware.org/mailman/listinfo/gnu-gabi
> >
> > We can try #1 first.
>
> Do you want to drive this, or should I ? It looks like you know the people
> involved better than I do.
>

https://groups.google.com/g/generic-abi/c/1ngxmSwrafc

-- 
H.J.

  reply	other threads:[~2021-07-28 20:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 19:32 [RFC PATCH 3/3] add r_debug multiple namespaces support Daniel Walker via Libc-alpha
2020-06-26 21:05 ` Florian Weimer via Libc-alpha
2020-06-26 21:19   ` Carlos O'Donell via Libc-alpha
2020-06-26 21:24     ` Florian Weimer via Libc-alpha
2020-06-26 21:44       ` Carlos O'Donell via Libc-alpha
2020-06-27  9:34         ` Florian Weimer
2020-06-28 12:34           ` Carlos O'Donell via Libc-alpha
2020-06-29  8:51             ` Florian Weimer via Libc-alpha
2021-07-23 23:38               ` H.J. Lu via Libc-alpha
2021-07-27 17:39                 ` Daniel Walker via Libc-alpha
2021-07-27 18:14                   ` H.J. Lu via Libc-alpha
2021-07-28 15:15                     ` H.J. Lu via Libc-alpha
2021-07-28 15:44                       ` Daniel Walker via Libc-alpha
2021-07-28 17:14                         ` H.J. Lu via Libc-alpha
2021-07-28 19:02                           ` Daniel Walker via Libc-alpha
2021-07-28 20:04                             ` H.J. Lu via Libc-alpha [this message]
2021-08-02  4:24                               ` RFC: Add DT_GNU_DEBUG H.J. Lu via Libc-alpha
2021-08-02  5:22                                 ` Florian Weimer via Libc-alpha
2021-08-02 13:10                                   ` H.J. Lu via Libc-alpha
2021-08-03 16:39                                     ` Daniel Walker via Libc-alpha
2021-08-03 18:08                                       ` H.J. Lu via Libc-alpha
2021-08-03 20:04                                         ` Daniel Walker via Libc-alpha
2021-08-03 18:12                                       ` Florian Weimer via Libc-alpha
2021-08-03 18:23                                         ` H.J. Lu via Libc-alpha
2021-08-03 20:13                                           ` Florian Weimer via Libc-alpha
2021-08-03 20:21                                             ` H.J. Lu via Libc-alpha
2021-08-09 14:32                                               ` RFC: 2 choices of DT_XXX for dlmopen H.J. Lu via Libc-alpha
2021-08-09 17:16                                                 ` Daniel Walker via Libc-alpha
2021-08-15  0:33                                                   ` [PATCH] Extend struct r_debug to support multiple namespaces H.J. Lu via Libc-alpha
2021-08-16 16:20                                                     ` Daniel Walker via Libc-alpha
2021-08-17  1:07                                                       ` H.J. Lu via Libc-alpha
2020-06-27  1:21       ` [RFC PATCH 3/3] add r_debug multiple namespaces support Daniel Walker (danielwa) via Libc-alpha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMe9rOoVCWg+9c1nq9+HeA9uBkb8Hdu-kamczBHjaF+wciq5fw@mail.gmail.com \
    --to=libc-alpha@sourceware.org \
    --cc=conhuang@cisco.com \
    --cc=danielwa@cisco.com \
    --cc=fw@deneb.enyo.de \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=jstengle@cisco.com \
    --cc=markus.t.metzger@intel.com \
    --cc=palves@redhat.com \
    --cc=xe-linux-external@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).