public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.29/master] debug: Mark libSegFault.so as NODELETE
Date: Fri, 21 Jul 2023 14:41:17 +0000 (GMT)	[thread overview]
Message-ID: <20230721144117.D76763858409@sourceware.org> (raw)

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

commit 66b1fe1d4fa67714925ac381c18f8b9cffdb968a
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 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))

                 reply	other threads:[~2023-07-21 14:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230721144117.D76763858409@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@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).