aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-02-02 16:22:23 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-02-05 09:52:16 +0100
commit68c9ef4419b8a4574dacc8e96296ec24bdc01da8 (patch)
tree9f1e2284b6499d2008e51d3416d69dd14a22bbc1 /elf
parent37a0933e1bf97346b45463bde0c4631be8abaa07 (diff)
downloadglibc-68c9ef4419b8a4574dacc8e96296ec24bdc01da8.tar.xz
glibc-68c9ef4419b8a4574dacc8e96296ec24bdc01da8.zip
elf: Build dl-tls.o with early startup symbol redirections
This is required when building for powerpc64le POWER8 with GCC 8 at least. Fixes commit cbd9fd236981717d3d4ee942986ea912e9707c32 ("Consolidate TLS block allocation for static binaries with ld.so"). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-tls.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 8306a39e8d..5178d9b66a 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -39,6 +39,12 @@
#include <dl-extra_tls.h>
+/* This code is used during early startup when statically linked,
+ via __libc_setup_tls in csu/libc-tls.c. */
+#ifndef SHARED
+# include <dl-symbol-redir-ifunc.h>
+#endif
+
/* Surplus static TLS, GLRO(dl_tls_static_surplus), is used for
- IE TLS in libc.so for all dlmopen namespaces except in the initial