about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-14 15:47:14 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-14 15:53:04 +0000
commite2b9d562d1e024fda6d10f0f272521bf20fa664f (patch)
tree89a0a6dc1de3e893035dbc5d72d53e11df8b36e7
parentea5cad3e37ad54b10f49a2d9f9c0feb1e285da77 (diff)
downloadglibc-e2b9d562d1e024fda6d10f0f272521bf20fa664f.tar.gz
glibc-e2b9d562d1e024fda6d10f0f272521bf20fa664f.tar.xz
glibc-e2b9d562d1e024fda6d10f0f272521bf20fa664f.zip
htl: initialize first and prevent from unloading
libc does not have codepaths for reverting the load of a libpthread.

* htl/Makefile (LDFLAGS-pthread.so): Pass -z nodelete -z initfirst to
linker.
-rw-r--r--htl/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/htl/Makefile b/htl/Makefile
index c424bd512b..326a920fb3 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -205,6 +205,7 @@ $(inst_libdir)/libpthread_syms.a: $(srcdir)/libpthread_syms.a $(+force)
 libc-link.so = $(common-objpfx)libc.so
 
 extra-B-pthread.so = -B$(common-objpfx)htl/
+LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
 
 include ../Rules