From 5e1019b01c968707accc85c99e63a18af665cf27 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 10 Sep 2018 15:42:03 -0400 Subject: [PATCH] make arch __set_thread_area backends hidden this is not a public interface, and does not even necessarily match the syscall on all archs that have a syscall by that name. on archs where it's implemented in C, no action on the source file is needed; the hidden declaration in pthread_arch.h suffices. --- src/internal/pthread_impl.h | 2 +- src/thread/aarch64/__set_thread_area.s | 1 + src/thread/i386/__set_thread_area.s | 1 + src/thread/microblaze/__set_thread_area.s | 1 + src/thread/or1k/__set_thread_area.s | 1 + src/thread/powerpc/__set_thread_area.s | 1 + src/thread/powerpc64/__set_thread_area.s | 1 + src/thread/s390x/__set_thread_area.s | 1 + src/thread/x32/__set_thread_area.s | 1 + src/thread/x86_64/__set_thread_area.s | 1 + 10 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 3c85544c..813b5966 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -142,7 +142,7 @@ void *__copy_tls(unsigned char *); void __reset_tls(); hidden int __clone(int (*)(void *), void *, int, void *, ...); -int __set_thread_area(void *); +hidden int __set_thread_area(void *); int __libc_sigaction(int, const struct sigaction *, struct sigaction *); void __unmapself(void *, size_t); diff --git a/src/thread/aarch64/__set_thread_area.s b/src/thread/aarch64/__set_thread_area.s index 97a80acc..fd0df34b 100644 --- a/src/thread/aarch64/__set_thread_area.s +++ b/src/thread/aarch64/__set_thread_area.s @@ -1,4 +1,5 @@ .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: msr tpidr_el0,x0 diff --git a/src/thread/i386/__set_thread_area.s b/src/thread/i386/__set_thread_area.s index 3a558fb0..c2c21dd5 100644 --- a/src/thread/i386/__set_thread_area.s +++ b/src/thread/i386/__set_thread_area.s @@ -1,5 +1,6 @@ .text .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: push %ebx diff --git a/src/thread/microblaze/__set_thread_area.s b/src/thread/microblaze/__set_thread_area.s index 21dc1e1f..9a226a91 100644 --- a/src/thread/microblaze/__set_thread_area.s +++ b/src/thread/microblaze/__set_thread_area.s @@ -1,4 +1,5 @@ .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: ori r21, r5, 0 diff --git a/src/thread/or1k/__set_thread_area.s b/src/thread/or1k/__set_thread_area.s index 44c5d459..b9ffb930 100644 --- a/src/thread/or1k/__set_thread_area.s +++ b/src/thread/or1k/__set_thread_area.s @@ -1,4 +1,5 @@ .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: l.ori r10, r3, 0 diff --git a/src/thread/powerpc/__set_thread_area.s b/src/thread/powerpc/__set_thread_area.s index c1a34c1f..86c498fa 100644 --- a/src/thread/powerpc/__set_thread_area.s +++ b/src/thread/powerpc/__set_thread_area.s @@ -1,5 +1,6 @@ .text .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area, %function __set_thread_area: # mov pointer in reg3 into r2 diff --git a/src/thread/powerpc64/__set_thread_area.s b/src/thread/powerpc64/__set_thread_area.s index 9622826d..bb9c55d6 100644 --- a/src/thread/powerpc64/__set_thread_area.s +++ b/src/thread/powerpc64/__set_thread_area.s @@ -1,5 +1,6 @@ .text .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area, %function __set_thread_area: mr 13, 3 diff --git a/src/thread/s390x/__set_thread_area.s b/src/thread/s390x/__set_thread_area.s index fd412913..00a11e25 100644 --- a/src/thread/s390x/__set_thread_area.s +++ b/src/thread/s390x/__set_thread_area.s @@ -1,5 +1,6 @@ .text .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area, %function __set_thread_area: sar %a1, %r2 diff --git a/src/thread/x32/__set_thread_area.s b/src/thread/x32/__set_thread_area.s index e0daf72f..c0fee87e 100644 --- a/src/thread/x32/__set_thread_area.s +++ b/src/thread/x32/__set_thread_area.s @@ -1,6 +1,7 @@ /* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */ .text .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: mov %edi,%esi /* shift for syscall */ diff --git a/src/thread/x86_64/__set_thread_area.s b/src/thread/x86_64/__set_thread_area.s index f3ff4f61..7347ff4d 100644 --- a/src/thread/x86_64/__set_thread_area.s +++ b/src/thread/x86_64/__set_thread_area.s @@ -1,6 +1,7 @@ /* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */ .text .global __set_thread_area +.hidden __set_thread_area .type __set_thread_area,@function __set_thread_area: mov %rdi,%rsi /* shift for syscall */ -- 2.25.1