From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id A52123858409; Fri, 21 Jul 2023 14:41:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A52123858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689950497; bh=tLvi48OkjxA6+uYGtFBL3/wKd6zG+MZR+nQrp3n4QzY=; h=From:To:Subject:Date:From; b=AT0S3FTTZ8a5P42elzMZXdz5ct/Vu5GLJFsttbzy+RB8AfLlgLdyol9+xWbCXU49+ B5Jk78Bal7It6YnstIXlYksgZiZDKhpyxoyVbfEKUmL1uUpvpSbzUGgRFzgcBwP6vE iLcz5auRkgOOWUhg+2Ze7G3K4o70QoEJ91cQ4Ajc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/release/2.28/master] debug: Mark libSegFault.so as NODELETE X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/release/2.28/master X-Git-Oldrev: c9e58ae23402eb82877de90fd8a18519c086ed87 X-Git-Newrev: 0fda2a41baf7e978d07322aa278e964f4dce8802 Message-Id: <20230721144137.A52123858409@sourceware.org> Date: Fri, 21 Jul 2023 14:41:37 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0fda2a41baf7e978d07322aa278e964f4dce8802 commit 0fda2a41baf7e978d07322aa278e964f4dce8802 Author: Florian Weimer 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 (cherry picked from commit 23ee92deea4c99d0e6a5f48fa7b942909b123ec5) Diff: --- debug/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debug/Makefile b/debug/Makefile index 506cebc3c4..8618d577f1 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))