From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Cc: libc-stable@sourceware.org
Subject: [PATCH 2.34] debug: Mark libSegFault.so as NODELETE
Date: Thu, 20 Jul 2023 18:53:23 +0200 [thread overview]
Message-ID: <87cz0mmsn0.fsf@oldenburg.str.redhat.com> (raw)
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.
Submitting this for 2.34 because libSegFault.so was removed in 2.35.
Verified using readelf -dW that NODELETE is now set on libSegFault.so.
(Note that there is no lib prefix on the LDFLAGS variable.)
---
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))
base-commit: cad3adf4ddeada37912c1c13b59a2ea5dd5d2832
next reply other threads:[~2023-07-20 16:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 16:53 Florian Weimer [this message]
2023-07-21 14:33 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cz0mmsn0.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-stable@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).