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

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

commit 23ee92deea4c99d0e6a5f48fa7b942909b123ec5
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>

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

diff --git a/debug/Makefile b/debug/Makefile
index 71248e0d45..9fbc40dc69 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -213,6 +213,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:39 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:39 [glibc/release/2.34/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).