From b44c1e12524bb5de0f93294a7c24c8e41c06bb75 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Fri, 19 May 2023 17:47:24 +0300 Subject: 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 Signed-off-by: Sergey Bugaev --- hurd/Versions | 1 + hurd/thread-self.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'hurd') 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 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) -- cgit 1.4.1