]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Build dl-tls.o with early startup symbol redirections
authorFlorian Weimer <fweimer@redhat.com>
Sun, 2 Feb 2025 15:22:23 +0000 (16:22 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 5 Feb 2025 08:52:16 +0000 (09:52 +0100)
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>
csu/libc-tls.c
elf/dl-tls.c

index 07c37f3af9b1fd7737788b2837384afd77d475b4..0da39b72b484f3716091b6911ca52e87347158f4 100644 (file)
@@ -30,6 +30,7 @@
 #include <dl-extra_tls.h>
 #include <array_length.h>
 #include <elf/dl-tls_block_align.h>
+#include <dl-symbol-redir-ifunc.h>
 
 #ifdef SHARED
  #error makefile bug, this file is for static only
index 8306a39e8dc799167e6b63c5a0acdd893fb43655..5178d9b66a9f73dfdee363ebe23e635b604bf60b 100644 (file)
 
 #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