Upstream commit: fffc2df8a3e2c8cda2991063d23086360268b777 - i386: Provide GLIBC_ABI_GNU_TLS symbol version [BZ #33221] - i386: Update ___tls_get_addr to preserve vector registers - Extend struct r_debug to support multiple namespaces (RHEL-101985) - Fix a potential crash in the dynamic loader when processing specific symbol versions (RHEL-109683) - Signal la_objopen for ld.so with dlmopen (RHEL-109693) - Switch to main malloc after final ld.so self-relocation (RHEL-109703) - Prevent ld.so from asserting and crashing during audited library loads (RHEL-109702) - x86-64: Provide GLIBC_ABI_DT_X86_64_PLT symbol version (RHEL-109621) - x86-64, i386: Provide GLIBC_ABI_GNU2_TLS symbol version (RHEL-109625) - Ensure fallback initialization of ctype TLS data pointers to fix segfaults in programs using dlmopen or auditors (RHEL-72018) - Handle load segment gaps in _dl_find_object (RHEL-104854) - AArch64: Improve codegen in SVE log1p - AArch64: Optimize inverse trig functions - AArch64: Avoid memset ifunc in cpu-features.c [BZ #33112] Resolves: RHEL-109536 Resolves: RHEL-72018 Resolves: RHEL-101985 Resolves: RHEL-104854 Resolves: RHEL-109621 Resolves: RHEL-109625 Resolves: RHEL-109683 Resolves: RHEL-109693 Resolves: RHEL-109702 Resolves: RHEL-109703
65 lines
2.2 KiB
Diff
65 lines
2.2 KiB
Diff
commit 62ff85fd09ff648183af4265f07dace2879e6d42
|
|
Author: H.J. Lu <hjl.tools@gmail.com>
|
|
Date: Mon Jul 28 12:18:22 2025 -0700
|
|
|
|
x86-64: Add GLIBC_ABI_GNU2_TLS version [BZ #33129]
|
|
|
|
Programs and shared libraries compiled with -mtls-dialect=gnu2 may fail
|
|
silently at run-time against glibc without the GNU2 TLS run-time fix
|
|
for:
|
|
|
|
https://sourceware.org/bugzilla/show_bug.cgi?id=31372
|
|
|
|
Add GLIBC_ABI_GNU2_TLS version to indicate that glibc has the working
|
|
GNU2 TLS run-time. Linker can add the GLIBC_ABI_GNU2_TLS version to
|
|
binaries which depend on the working GNU2 TLS run-time:
|
|
|
|
https://sourceware.org/bugzilla/show_bug.cgi?id=33130
|
|
|
|
so that such programs and shared libraries will fail to load and run at
|
|
run-time against libc.so without the GLIBC_ABI_GNU2_TLS version, instead
|
|
of fail silently at random.
|
|
|
|
This fixes BZ #33129.
|
|
|
|
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
Reviewed-by: Sam James <sam@gentoo.org>
|
|
(cherry picked from commit 9df8fa397d515dc86ff5565f6c45625e672d539e)
|
|
|
|
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
|
|
index 08ec882159990e97..af978601657c2129 100644
|
|
--- a/sysdeps/x86_64/Makefile
|
|
+++ b/sysdeps/x86_64/Makefile
|
|
@@ -209,6 +209,15 @@ LDFLAGS-tst-plt-rewrite2 = -Wl,-z,now
|
|
LDFLAGS-tst-plt-rewritemod2.so = -Wl,-z,now,-z,undefs
|
|
tst-plt-rewrite2-ENV = GLIBC_TUNABLES=glibc.cpu.plt_rewrite=2
|
|
$(objpfx)tst-plt-rewrite2: $(objpfx)tst-plt-rewritemod2.so
|
|
+
|
|
+tests-special += $(objpfx)check-gnu2-tls.out
|
|
+
|
|
+$(objpfx)check-gnu2-tls.out: $(common-objpfx)libc.so
|
|
+ LC_ALL=C $(READELF) -V -W $< \
|
|
+ | sed -ne '/.gnu.version_d/, /.gnu.version_r/ p' \
|
|
+ | grep GLIBC_ABI_GNU2_TLS > $@; \
|
|
+ $(evaluate-test)
|
|
+generated += check-gnu2-tls.out
|
|
endif
|
|
|
|
test-internal-extras += tst-gnu2-tls2mod1
|
|
diff --git a/sysdeps/x86_64/Versions b/sysdeps/x86_64/Versions
|
|
index e94758b23643a905..a63c11bcb25adf48 100644
|
|
--- a/sysdeps/x86_64/Versions
|
|
+++ b/sysdeps/x86_64/Versions
|
|
@@ -5,6 +5,11 @@ libc {
|
|
GLIBC_2.13 {
|
|
__fentry__;
|
|
}
|
|
+ GLIBC_ABI_GNU2_TLS {
|
|
+ # This symbol is used only for empty version map and will be removed
|
|
+ # by scripts/versions.awk.
|
|
+ __placeholder_only_for_empty_version_map;
|
|
+ }
|
|
}
|
|
libm {
|
|
GLIBC_2.1 {
|