glibc/glibc-upstream-2.39-256.patch
Arjun Shankar 53f4d259fa Sync with upstream branch release/2.39/master (RHEL-109536)
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
2025-08-21 10:25:39 +02:00

91 lines
2.9 KiB
Diff

commit 5541edb1bd57414556c8dfe08493ae4b8694e4b4
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Aug 18 09:06:48 2025 -0700
i386: Also add GLIBC_ABI_GNU2_TLS version [BZ #33129]
Since the GNU2 TLS run-time bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=31372
affects both i386 and x86-64, also add GLIBC_ABI_GNU2_TLS version to i386
to indicate the working GNU2 TLS run-time. For x86-64, the additional
GNU2 TLS run-time bug fix is needed for
https://sourceware.org/bugzilla/show_bug.cgi?id=31501
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
(cherry picked from commit bd4628f3f18ac312408782eea450429c6f044860)
diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
index f64cee3cd9a13c3e..c814060e08b3ceeb 100644
--- a/sysdeps/x86/Makefile
+++ b/sysdeps/x86/Makefile
@@ -127,6 +127,15 @@ LDFLAGS-tst-tls23 += -rdynamic
tst-tls23-mod.so-no-z-defs = yes
$(objpfx)tst-tls23-mod.so: $(libsupport)
+
+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
ifeq ($(subdir),math)
diff --git a/sysdeps/x86/Versions b/sysdeps/x86/Versions
index 33dbd67b64c3ab5e..06f414bc148340bd 100644
--- a/sysdeps/x86/Versions
+++ b/sysdeps/x86/Versions
@@ -8,4 +8,9 @@ libc {
GLIBC_2.33 {
__x86_get_cpuid_feature_leaf;
}
+ 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;
+ }
}
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index a738e0178220d9ca..c97b3ac13af248c0 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -215,15 +215,6 @@ $(objpfx)check-dt-x86-64-plt.out: $(common-objpfx)libc.so
| grep GLIBC_ABI_DT_X86_64_PLT > $@; \
$(evaluate-test)
generated += check-dt-x86-64-plt.out
-
-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 0a759029e5a00cf1..6a989ad3b373cdf6 100644
--- a/sysdeps/x86_64/Versions
+++ b/sysdeps/x86_64/Versions
@@ -5,11 +5,6 @@ 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;
- }
GLIBC_ABI_DT_X86_64_PLT {
# This symbol is used only for empty version map and will be removed
# by scripts/versions.awk.