[PATCH v2 2/2] Extend struct r_debug to support multiple namespaces
Daniel Walker
danielwa@cisco.com
Tue Aug 17 17:57:33 GMT 2021
On Mon, Aug 16, 2021 at 06:06:29PM -0700, H.J. Lu wrote:
> Glibc does not provide an interface for debugger to access libraries
> loaded in multiple namespaces via dlmopen.
>
> The current rtld-debugger interface is described in the file:
>
> elf/rtld-debugger-interface.txt
>
> under the "Standard debugger interface" heading. This interface only
> provides access to the first link-map (LM_ID_BASE).
>
> Based on the patch from Conan C Huang <conhuang@cisco.com>:
>
> https://sourceware.org/pipermail/libc-alpha/2020-June/115448.html
>
> 1. Bump r_version to 2. This triggers the GDB bug:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28236
>
> 2. Add struct r_debug_extended to extend struct r_debug into a linked-list,
> where each element correlates to an unique namespace.
> 3. Add a hidden symbol, _r_debug_extended, for struct r_debug_extended.
> 4. Provide the compatibility symbol, _r_debug, with size of struct r_debug,
> as an alise of _r_debug_extended, for programs which reference _r_debug.
I've attached the GDB patch which was created at Cisco to support our version of
this type of feature which is similar to what you've created. You might be able
to make some small modifications to make it work for you.
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Added-support-for-dlmopen.patch
Type: text/x-diff
Size: 11082 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20210817/31004cf2/attachment-0001.bin>
More information about the Libc-alpha
mailing list