RFC: Add DT_GNU_DEBUG

H.J. Lu hjl.tools@gmail.com
Tue Aug 3 18:08:35 GMT 2021


On Tue, Aug 3, 2021 at 9:39 AM Daniel Walker <danielwa@cisco.com> wrote:
>
> On Mon, Aug 02, 2021 at 06:10:55AM -0700, H.J. Lu wrote:
> > On Sun, Aug 1, 2021 at 10:22 PM Florian Weimer <fweimer@redhat.com> wrote:
> > >
> > > * H. J. Lu:
> > >
> > > > On Wed, Jul 28, 2021 at 1:04 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> > > >> > 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
> > > >>
> > > >
> > > > I don't think the gABI community is interested in a new debug dynamic
> > > > tag.  I propose DT_GNU_DEBUG:
> > > >
> > > > #define DT_GNU_DEBUG   0x6ffffff8
> > > >
> > > > for the address of a pointer which will be filled by the dynamic
> > > > linker.  Linker should
> > > > add the DT_GNU_DEBUG entry to executable's dynamic section.
> > > >
> > > > BTW, we have a choice.  DT_GNU_DEBUG can be readonly or readonly after
> > > > relocation, like DT_DEBUG.
> > >
> > > What about adding DT_DEBUG_SIZE, specifying the size of the data pointed
> > > to by DT_DEBUG?
> >
> > It works if we don't need to support static executables.

Given that we export _r_debug and some programs, like GNAT, use it,
we should keep and fix _r_debug.  We should also make the new interface
available for these programs and include the structure size in the new
interface.

> >
> > > Perhaps the gABI folks are interested in that, too?  I think it's worth
> > > a try.  If the answer is “no”, we can still add DT_GNU_DEBUG_SIZE to the
> > > GNU ABI.
> >
> > I did.  I didn't get any feedback.
>
> So no feedback equal "not interested" ?

I'd like to resolve this issue for glibc 2.35.  We need to move forward with
a new DT_XXX.  We can't wait too long.


-- 
H.J.


More information about the Libc-alpha mailing list