[RFC PATCH 0/3] implement dlmopen hooks for gdb

Daniel Walker (danielwa) danielwa@cisco.com
Mon Sep 21 20:02:16 GMT 2020


On Fri, Sep 18, 2020 at 05:40:30PM +0200, Florian Weimer wrote:
> * Daniel Walker:
> 
> > On Thu, Sep 17, 2020 at 09:53:30AM -0400, Carlos O'Donell wrote:
> >> On 9/17/20 8:59 AM, Florian Weimer wrote:
> >> > * Carlos O'Donell:
> >> > 
> >> >> You will always have .dynsym with a definition for _r_debug_dlmopen.
> >> > 
> >> > Note that this doesn't work if you just have a core file.  In order to
> >> > find _r_debug (or _r_debug_dlmopen), a debugger needs the exact same
> >> > copy of ld.so that was used by the executable, otherwise the symbol
> >> > cannot be found in the image.
> >> 
> >> You are correct.
> >> 
> >> I followed up on my own email regarding this.
> >> 
> >> So in the end to get process and core file debugging we'll need:
> >> 
> >> * _r_debug_dlmopen
> >> * DT_DEBUG_DLMOPEN
> >> 
> >
> > It seems like adding DT_DEBUG_DLMOPEN into the gABI might take some
> > effort. Have you considered this ? The last one which was added was
> > DT_SYMTAB_SHNDX in 2018, and it looks like it did not come from glibc.
> 
> We are reviving GNU gABI maintenance.  There's been quite a bit of list
> activity, and a proposal of a first ABI document:
> 
>   <https://sourceware.org/pipermail/gnu-gabi/2020q3/thread.html>
> 
> I have a feeling that we might be soon over this bump, and getting
> things added should become easier.
> 
> In the meantime, can we demo this feature without DT_DEBUG_DLMOPEN?
> With a patch glibc and gdb?  Incidentally, I have an LD_AUDIT issue I
> need to debug. 8-)
> 

The only fully working version we have is the one I released originally. Yes,
that version had no DT_DEBUG_DLMOPEN. It should be working and you can demo it. 

We're still working on updating GDB to use the new interfaces.

In terms of updating the gABI, should I just add a patch to glibc to add values
or do I need special documents to be submitted ?

Daniel


More information about the Libc-alpha mailing list