public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.32/master] debug: Mark libSegFault.so as NODELETE
@ 2023-07-21 14:40 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2023-07-21 14:40 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bf4a99baedf5277185f9fe215ed9636490d251f8

commit bf4a99baedf5277185f9fe215ed9636490d251f8
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jul 20 18:31:48 2023 +0200

    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)

Diff:
---
 debug/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debug/Makefile b/debug/Makefile
index 0036edd187..75584027b0 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))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-21 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21 14:40 [glibc/release/2.32/master] debug: Mark libSegFault.so as NODELETE Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).