Make libSegFault.so NODELETE (#2224349)

Resolves: #2224349
This commit is contained in:
Florian Weimer 2023-07-21 20:56:01 +02:00
parent 86889b9545
commit a422f55007
2 changed files with 31 additions and 1 deletions

26
glibc-rh2224349.patch Normal file
View File

@ -0,0 +1,26 @@
commit 23ee92deea4c99d0e6a5f48fa7b942909b123ec5
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>
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))

View File

@ -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 <fweimer@redhat.com> - 2.34-75
- Make libSegFault.so NODELETE (#2224349)
* Fri Jul 21 2023 Florian Weimer <fweimer@redhat.com> - 2.34-74
- rseq_area should always be 32 bytes large (#2224289)