glibc/csu
H.J. Lu a93d9e03a3 Extend struct r_debug to support multiple namespaces [BZ #15971]
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).

1. Bump r_version to 2 when multiple namespaces are used.  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. Initialize the r_debug_extended structure.  Bump r_version to 2 for
the new namespace and add the new namespace to the namespace linked list.
4. Add _dl_debug_update to return the address of struct r_debug' of a
namespace.
5. Add a hidden symbol, _r_debug_extended, for struct r_debug_extended.
6. Provide the symbol, _r_debug, with size of struct r_debug, as an alias
of _r_debug_extended, for programs which reference _r_debug.

This fixes BZ #15971.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2021-09-19 13:51:35 -07:00
..
abi-note.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check_fds.c Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03:00
dso_handle.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
errno-loc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
errno.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gmon-start.c Use __executable_start as the lowest address for profiling [BZ #28153] 2021-08-24 06:44:18 -07:00
init-first.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-start.c Force building with -fno-common 2021-07-09 20:09:14 +02:00
libc-tls.c elf: Introduce __tls_pre_init_tp 2021-05-10 10:31:41 +02:00
Makefile Extend struct r_debug to support multiple namespaces [BZ #15971] 2021-09-19 13:51:35 -07:00
rtld-sizes.sym Extend struct r_debug to support multiple namespaces [BZ #15971] 2021-09-19 13:51:35 -07:00
start.c More fallout from supporting only ELF 2012-01-08 00:45:01 -05:00
static-reloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
version.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00