[PATCH 2/2] ld.so: Hide _r_debug to support DT_DEBUG [BZ #28130]

H.J. Lu hjl.tools@gmail.com
Mon Aug 2 20:43:31 GMT 2021


On Mon, Aug 2, 2021 at 6:29 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Aug 01 2021, H.J. Lu via Libc-alpha wrote:
>
> > 1. Add a function, __r_debug_location, which returns the address of
> > _r_debug:
> >
> > /* Return the address of that structure used by the dynamic linker.  */
> > extern struct r_debug * __r_debug_location (void) __attribute_const__;
> >
> > It has a special glibc version, GLIBC_DEBUG.
> >
> > 2. Hide _r_debug in ld.so by defining _r_debug with __r_debug_location:
> >
> >  #define _r_debug (*__r_debug_location ())
>
> There is no need for that.  Nobody should be using _r_debug.
>

Removed from the v2 patch.

-- 
H.J.


More information about the Libc-alpha mailing list