summaryrefslogtreecommitdiffstats
path: root/source/l/glibc/patches/reenable_DT_HASH.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/glibc/patches/reenable_DT_HASH.patch')
-rw-r--r--source/l/glibc/patches/reenable_DT_HASH.patch104
1 files changed, 30 insertions, 74 deletions
diff --git a/source/l/glibc/patches/reenable_DT_HASH.patch b/source/l/glibc/patches/reenable_DT_HASH.patch
index f828b011b..7b7fe9ee4 100644
--- a/source/l/glibc/patches/reenable_DT_HASH.patch
+++ b/source/l/glibc/patches/reenable_DT_HASH.patch
@@ -1,27 +1,7 @@
-From e47de5cb2d4dbecb58f569ed241e8e95c568f03c Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Fri, 29 Apr 2022 16:37:51 +0200
-Subject: [PATCH] Do not use --hash-style=both for building glibc shared
- objects
-
-The comment indicates that --hash-style=both was used to maintain
-compatibility with static dlopen, but we had many internal ABI
-changes since then, so this compatiblity does not add value anymore.
-
-Reviewed-by: Carlos O'Donell <carlos@redhat.com>
----
- Makeconfig | 9 +++++++++
- Makerules | 7 +++++++
- config.make.in | 1 +
- configure | 28 ++++++++++++++++++++++++++++
- configure.ac | 16 ++++++++++++++++
- 5 files changed, 61 insertions(+)
-
-diff --git b/Makeconfig a/Makeconfig
-index 760f14e92f..0aa5fb0099 100644
---- b/Makeconfig
-+++ a/Makeconfig
-@@ -362,6 +362,15 @@ relro-LDFLAGS = -Wl,-z,relro
+diff -up glibc-2.38/Makeconfig.45~ glibc-2.38/Makeconfig
+--- glibc-2.38/Makeconfig.45~ 2023-08-01 01:02:58.246719027 +0200
++++ glibc-2.38/Makeconfig 2023-08-01 01:02:58.303719582 +0200
+@@ -381,6 +381,15 @@ relro-LDFLAGS = -Wl,-z,relro
LDFLAGS.so += $(relro-LDFLAGS)
LDFLAGS-rtld += $(relro-LDFLAGS)
@@ -34,53 +14,34 @@ index 760f14e92f..0aa5fb0099 100644
+LDFLAGS-rtld += $(hashstyle-LDFLAGS)
+endif
+
- ifeq (no,$(build-pie-default))
- pie-default = $(no-pie-ccflag)
- else # build-pie-default
-diff --git b/Makerules a/Makerules
-index 354528b8c7..428464f092 100644
---- b/Makerules
-+++ a/Makerules
-@@ -557,6 +557,13 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
- -Wl,--verbose 2>/dev/null | \
- sed > $@T \
- -e '/^=========/,/^=========/!d;/^=========/d' \
-+ $(if $(filter yes,$(have-hash-style)), \
-+ -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
-+ -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \
-+ -e '/DATA_SEGMENT_ALIGN/{H;g}' \
-+ , \
-+ -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
-+ ) \
- -e 's/^.*\*(\.dynbss).*$$/& \
- PROVIDE(__start___libc_freeres_ptrs = .); \
- *(__libc_freeres_ptrs) \
-diff --git b/config.make.in a/config.make.in
-index fff4c78dd0..bf728c71c0 100644
---- b/config.make.in
-+++ a/config.make.in
-@@ -70,6 +70,7 @@ have-libcap = @have_libcap@
+ # Linker options to enable and disable DT_RELR.
+ ifeq ($(have-dt-relr),yes)
+ dt-relr-ldflag = -Wl,-z,pack-relative-relocs
+diff -up glibc-2.38/Makerules.45~ glibc-2.38/Makerules
+diff -up glibc-2.38/config.make.in.45~ glibc-2.38/config.make.in
+--- glibc-2.38/config.make.in.45~ 2023-08-01 01:02:58.301719562 +0200
++++ glibc-2.38/config.make.in 2023-08-01 01:03:54.721267748 +0200
+@@ -71,6 +71,7 @@ have-libaudit = @have_libaudit@
+ have-libcap = @have_libcap@
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
- fno-unit-at-a-time = @fno_unit_at_a_time@
bind-now = @bindnow@
+have-hash-style = @libc_cv_hashstyle@
- use-default-link = @use_default_link@
have-cxx-thread_local = @libc_cv_cxx_thread_local@
have-loop-to-function = @libc_cv_cc_loop_to_function@
-diff --git b/configure a/configure
-index 716dc041b6..5a730dc5fc 100755
---- b/configure
-+++ a/configure
-@@ -622,6 +622,7 @@ libc_cv_cc_nofma
+ have-textrel_ifunc = @libc_cv_textrel_ifunc@
+diff -up glibc-2.38/configure.45~ glibc-2.38/configure
+--- glibc-2.38/configure.45~ 2023-07-31 19:54:16.000000000 +0200
++++ glibc-2.38/configure 2023-08-01 01:04:54.904850299 +0200
+@@ -655,6 +655,7 @@ libc_cv_cc_submachine
+ libc_cv_cc_nofma
libc_cv_mtls_dialect_gnu2
- fno_unit_at_a_time
libc_cv_has_glob_dat
+libc_cv_hashstyle
libc_cv_fpie
libc_cv_z_execstack
ASFLAGS_config
-@@ -6193,6 +6194,33 @@ $as_echo "$libc_cv_fpie" >&6; }
-
+@@ -7107,6 +7108,32 @@ fi
+ printf "%s\n" "$libc_cv_fpie" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --hash-style option" >&5
@@ -92,8 +53,8 @@ index 716dc041b6..5a730dc5fc 100755
+int _start (void) { return 42; }
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
-+ -fPIC -shared -o conftest.so conftest.c
-+ -Wl,--hash-style=both -nostdlib 1>&5'
++ -fPIC -shared -o conftest.so conftest.c
++ -Wl,--hash-style=both -nostdlib 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
@@ -109,15 +70,13 @@ index 716dc041b6..5a730dc5fc 100755
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hashstyle" >&5
+$as_echo "$libc_cv_hashstyle" >&6; }
+
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5
- $as_echo_n "checking for GLOB_DAT reloc... " >&6; }
- if ${libc_cv_has_glob_dat+:} false; then :
-diff --git b/configure.ac a/configure.ac
-index d08ad4d64e..a045f6608e 100644
---- b/configure.ac
-+++ a/configure.ac
-@@ -1360,6 +1360,22 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no])
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5
+ printf %s "checking for GLOB_DAT reloc... " >&6; }
+diff -up glibc-2.38/configure.ac.45~ glibc-2.38/configure.ac
+--- glibc-2.38/configure.ac.45~ 2023-07-31 19:54:16.000000000 +0200
++++ glibc-2.38/configure.ac 2023-08-01 01:02:58.303719582 +0200
+@@ -1339,6 +1339,22 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpi
AC_SUBST(libc_cv_fpie)
@@ -140,6 +99,3 @@ index d08ad4d64e..a045f6608e 100644
AC_CACHE_CHECK(for GLOB_DAT reloc,
libc_cv_has_glob_dat, [dnl
cat > conftest.c <<EOF
---
-2.37.1
-