[PATCH] Extend struct r_debug to support multiple namespaces

H.J. Lu hjl.tools@gmail.com
Tue Aug 17 01:07:02 GMT 2021


On Mon, Aug 16, 2021 at 9:20 AM Daniel Walker <danielwa@cisco.com> wrote:
>
> On Sat, Aug 14, 2021 at 05:33:36PM -0700, H.J. Lu wrote:
> > On Mon, Aug 09, 2021 at 10:16:53AM -0700, Daniel Walker wrote:
> > > On Mon, Aug 09, 2021 at 07:32:26AM -0700, H.J. Lu wrote:
> > > > We need a new DT_XXX to support dlmopen.  We have 2 choices:
> > > >
> > > > 1. Similar to DT_DEBUG.  Linker will allocate a new DT_XXX and
> > > > ld.so will fill it with the address of the new debug data structure for
> > > > dlmopen.
> > > > 2. Similar to DT_MIPS_RLD_MAP_REL/DT_MIPS_RLD_MAP.
> > > > Linker will allocate a space for a pointer, a new DT_XXX and fill
> > > > the DT_XXX entry with the address of the pointer.   ld.so will update
> > > > the pointer with the address of the new debug data structure for
> > > > dlmopen.
> > > >
> > > > #1 is the most straightforward to implement.  #2 is compatible with
> > > > the current MIPS implementation.
> > > >
> > > > Does anyone have any preferences?
> > >
> > >
> > > I have #1 fully implemented already.
> > >
> >
> > Here is a slightly different approach with DT_DEBUGSZ.  The corresponding
> > linker patch is at
> >
> > https://sourceware.org/pipermail/binutils/2021-August/117706.html
> >
> > H.J.
>
> What advantages does this provide over have a different structure ?
>
> Lets say we wanted to extend the structure further in the future , is that
> possible in this implementation ?

I submitted the v2 patch.

-- 
H.J.


More information about the Libc-alpha mailing list