From a422f55007aff7ad1f0839a3710182a8d0933565 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 21 Jul 2023 20:56:01 +0200 Subject: [PATCH] Make libSegFault.so NODELETE (#2224349) Resolves: #2224349 --- glibc-rh2224349.patch | 26 ++++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 glibc-rh2224349.patch diff --git a/glibc-rh2224349.patch b/glibc-rh2224349.patch new file mode 100644 index 0000000..48997a7 --- /dev/null +++ b/glibc-rh2224349.patch @@ -0,0 +1,26 @@ +commit 23ee92deea4c99d0e6a5f48fa7b942909b123ec5 +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 + +diff --git a/debug/Makefile b/debug/Makefile +index 71248e0d457a5b12..9fbc40dc69b477ca 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)) diff --git a/glibc.spec b/glibc.spec index 6244b56..a56b40d 100644 --- a/glibc.spec +++ b/glibc.spec @@ -155,7 +155,7 @@ end \ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 74%{?dist} +Release: 75%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -733,6 +733,7 @@ Patch492: glibc-rh2222188-4.patch Patch493: glibc-rh2222188-5.patch Patch494: glibc-rh2224289-1.patch Patch495: glibc-rh2224289-2.patch +Patch496: glibc-rh2224349.patch ############################################################################## # Continued list of core "glibc" package information: @@ -2890,6 +2891,9 @@ update_gconv_modules_cache () %endif %changelog +* Fri Jul 21 2023 Florian Weimer - 2.34-75 +- Make libSegFault.so NODELETE (#2224349) + * Fri Jul 21 2023 Florian Weimer - 2.34-74 - rseq_area should always be 32 bytes large (#2224289)