aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2023-07-20 18:31:48 +0200
committerFlorian Weimer <fweimer@redhat.com>2023-07-21 16:40:52 +0200
commita0350c84c15294ff01bde2a233a061c7b23cf4c3 (patch)
treec87d968b6138d9a442233d0190960d7f02b12e0b
parent706c8a7f063b67b80993309145265914d4b1a7e8 (diff)
downloadglibc-a0350c84c15294ff01bde2a233a061c7b23cf4c3.tar
glibc-a0350c84c15294ff01bde2a233a061c7b23cf4c3.tar.gz
glibc-a0350c84c15294ff01bde2a233a061c7b23cf4c3.tar.bz2
glibc-a0350c84c15294ff01bde2a233a061c7b23cf4c3.zip
debug: Mark libSegFault.so as NODELETE
The signal handler installed in the ELF constructor cannot easily be removed again (because the program may have changed handlers in the meantime). Mark the object as NODELETE so that the registered handler function is never unloaded. Reviewed-by: Carlos O'Donell <carlos@redhat.com> (cherry picked from commit 23ee92deea4c99d0e6a5f48fa7b942909b123ec5)
-rw-r--r--debug/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/debug/Makefile b/debug/Makefile
index 6351b7e9f4..48d03395a1 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -168,6 +168,8 @@ extra-libs-others = $(extra-libs)
libSegFault-routines = segfault
libSegFault-inhibit-o = $(filter-out .os,$(object-suffixes))
+# libSegFault.so installs a signal handler in its ELF constructor.
+LDFLAGS-SegFault.so = -Wl,--enable-new-dtags,-z,nodelete
libpcprofile-routines = pcprofile
libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes))