aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-07-04 21:46:30 +0200
committerFlorian Weimer <fweimer@redhat.com>2025-07-05 20:15:12 +0200
commitea85e7d55087075376a29261e722e4fae14ecbe7 (patch)
tree9915b760ca2e81597b8fcc6583180cea91e2efbe /sysdeps/unix
parent8329939a37f483a16013dd8af8303cbcb86d92cb (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
elf: Restore support for _r_debug interpositions and copy relocationsHEADmaster
The changes in commit a93d9e03a31ec14405cb3a09aa95413b67067380 ("Extend struct r_debug to support multiple namespaces [BZ #15971]") break the dyninst dynamic instrumentation tool. It brings its own definition of _r_debug (rather than a declaration). Furthermore, it turns out it is rather hard to use the proposed handshake for accessing _r_debug via DT_DEBUG. If applications want to access _r_debug, they can do so directly if the relevant code has been built as PIC. To protect against harm from accidental copy relocations due to linker relaxations, this commit restores copy relocation support by adjusting both copies if interposition or copy relocations are in play. Therefore, it is possible to use a hidden reference in ld.so to access _r_debug. Only perform the copy relocation initialization if libc has been loaded. Otherwise, the ld.so search scope can be empty, and the lookup of the _r_debug symbol mail fail. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps/unix')
0 files changed, 0 insertions, 0 deletions