glibc/sysdeps
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
..
aarch64 elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
alpha elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
arc elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
arm elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
csky elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
generic Extend struct r_debug to support multiple namespaces [BZ #15971] 2021-09-19 13:51:35 -07:00
gnu Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
hppa elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
htl htl: Reimplement GSCOPE 2021-09-16 01:04:17 +02:00
hurd
i386 elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
ia64 elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
ieee754 Redirect fma calls to __fma in libm 2021-09-15 22:57:35 +00:00
m68k elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
mach elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
microblaze elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
mips elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
nios2 elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
nptl Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
posix Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
powerpc elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
pthread nptl: Fix race between pthread_kill and thread exit (bug 12889) 2021-09-13 11:06:08 +02:00
riscv elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
s390 elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
sh elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
sparc elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
unix Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h 2021-09-14 14:19:24 +00:00
wordsize-32
wordsize-64 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
x86 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
x86_64 elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00