From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 776AC3858409; Fri, 21 Jul 2023 14:40:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 776AC3858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689950419; bh=JPf5KJ+F9qWO7Sa/QIuR628Ll/uc1PuC6HafePumR2Y=; h=From:To:Subject:Date:From; b=lOmcM1UALrKGI21FMb/cNKwMufa5RlQP8XitvnEDkQ6OliXI0WSB6GeEuLEB/utVA BUmk6iq9z5bpYX36H2Xwlyuvidj4hpzRfiW8K7Luy9S+WmZD58H0ft5s1yVERVwuWs jkzKw+8v00Cq3dao4Oc0Daf564Alwlu/BprVpRPQ= 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.32/master] debug: Mark libSegFault.so as NODELETE X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/release/2.32/master X-Git-Oldrev: 0a888ff9bd83bbad572e6cdf188006408b9aa9b1 X-Git-Newrev: bf4a99baedf5277185f9fe215ed9636490d251f8 Message-Id: <20230721144019.776AC3858409@sourceware.org> Date: Fri, 21 Jul 2023 14:40:19 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bf4a99baedf5277185f9fe215ed9636490d251f8 commit bf4a99baedf5277185f9fe215ed9636490d251f8 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 0036edd187..75584027b0 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))