public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.33/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=aef97dc952a6af0cbf4b2408993745fa97d89a2b

commit aef97dc952a6af0cbf4b2408993745fa97d89a2b
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 3f66666c6c..60d69397f9 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.33/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).