about summary refs log tree commit diff
path: root/hurd
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-05-19 17:47:24 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-19 20:45:51 +0200
commitb44c1e12524bb5de0f93294a7c24c8e41c06bb75 (patch)
tree0ebc7e70a7027b383545f9fbb56dfebba0cbaeeb /hurd
parent6af84886adb7105d452c0ffec21b5eed1ffa2d65 (diff)
downloadglibc-b44c1e12524bb5de0f93294a7c24c8e41c06bb75.tar.gz
glibc-b44c1e12524bb5de0f93294a7c24c8e41c06bb75.tar.xz
glibc-b44c1e12524bb5de0f93294a7c24c8e41c06bb75.zip
hurd: Fix using interposable hurd_thread_self
Create a private hidden __hurd_thread_self alias, and use that one.

Fixes 2f8ecb58a59eb82c43214d000842d99644a662d1
"hurd: Fix x86_64 _hurd_tls_fork" and
c7fcce38c83a2bb665ef5dc4981bf20c7e586123
"hurd: Make sure to not use tcb->self"

Reported-by: Joseph Myers <joseph@codesourcery.com>
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Diffstat (limited to 'hurd')
-rw-r--r--hurd/Versions1
-rw-r--r--hurd/thread-self.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/hurd/Versions b/hurd/Versions
index 3d8b412d49..439e8abf32 100644
--- a/hurd/Versions
+++ b/hurd/Versions
@@ -156,6 +156,7 @@ libc {
     __libc_open; __libc_close;
 
     # Used by libpthread.
+    __hurd_thread_self;
     _hurd_sigstate_set_global_rcv;
     _hurd_sigstate_lock;
     _hurd_sigstate_pending;
diff --git a/hurd/thread-self.c b/hurd/thread-self.c
index f37181656e..af013503bf 100644
--- a/hurd/thread-self.c
+++ b/hurd/thread-self.c
@@ -19,7 +19,10 @@
 #include <hurd/signal.h>
 
 thread_t
-hurd_thread_self (void)
+__hurd_thread_self (void)
 {
   return _hurd_self_sigstate ()->thread;
 }
+
+libc_hidden_def (__hurd_thread_self)
+weak_alias (__hurd_thread_self, hurd_thread_self)