From a75869f0b2528079503d2e4dd2174142ab1df904 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 20 May 2014 20:32:28 -0700 Subject: [PATCH] Hide __set_tls. Bug: 11156955 Change-Id: If82c10ae412651361d09591017d1c3a411bd6f0b --- libc/arch-arm64/bionic/__set_tls.c | 4 +++- libc/arch-x86/bionic/__set_tls.c | 2 +- libc/arch-x86_64/bionic/__set_tls.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libc/arch-arm64/bionic/__set_tls.c b/libc/arch-arm64/bionic/__set_tls.c index 4eb3ade6b..0d88d111d 100644 --- a/libc/arch-arm64/bionic/__set_tls.c +++ b/libc/arch-arm64/bionic/__set_tls.c @@ -26,6 +26,8 @@ * SUCH DAMAGE. */ -void __set_tls(void* tls) { +#include + +__LIBC_HIDDEN__ void __set_tls(void* tls) { asm("msr tpidr_el0, %0" : : "r" (tls)); } diff --git a/libc/arch-x86/bionic/__set_tls.c b/libc/arch-x86/bionic/__set_tls.c index 722ec6f6c..38ed3c9cf 100644 --- a/libc/arch-x86/bionic/__set_tls.c +++ b/libc/arch-x86/bionic/__set_tls.c @@ -57,7 +57,7 @@ __LIBC_HIDDEN__ void __init_user_desc(struct user_desc* result, bool allocate, v result->useable = 1; } -int __set_tls(void* ptr) { +__LIBC_HIDDEN__ int __set_tls(void* ptr) { struct user_desc tls_descriptor; __init_user_desc(&tls_descriptor, true, ptr); diff --git a/libc/arch-x86_64/bionic/__set_tls.c b/libc/arch-x86_64/bionic/__set_tls.c index cc7a5f454..68454444e 100644 --- a/libc/arch-x86_64/bionic/__set_tls.c +++ b/libc/arch-x86_64/bionic/__set_tls.c @@ -31,6 +31,6 @@ extern int __arch_prctl(int, unsigned long); -int __set_tls(void* ptr) { +__LIBC_HIDDEN__ int __set_tls(void* ptr) { return __arch_prctl(ARCH_SET_FS, (uintptr_t) ptr); }