summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-03-15 17:09:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-15 17:09:17 -0700
commitd7dc414afd1847e76ae317880bcedc9678953f9e (patch)
tree4285ff4a44232ed5f302a6695dfb49a34be7da3d
parent12ea8005665085ae82c1b233ae93d12855e04b8b (diff)
parent987fc5a3c4046831dc9e6c252e99a9c694bbd9ee (diff)
downloadbionic-d7dc414afd1847e76ae317880bcedc9678953f9e.zip
bionic-d7dc414afd1847e76ae317880bcedc9678953f9e.tar.gz
bionic-d7dc414afd1847e76ae317880bcedc9678953f9e.tar.bz2
am 987fc5a3: am adeec096: Merge "Hide various symbols that shouldn\'t be exposed."
* commit '987fc5a3c4046831dc9e6c252e99a9c694bbd9ee': Hide various symbols that shouldn't be exposed.
-rw-r--r--libc/bionic/libc_init_common.h2
-rw-r--r--libc/bionic/libc_init_dynamic.cpp6
-rw-r--r--libc/bionic/pthread_key.cpp4
-rw-r--r--libc/private/bionic_tls.h2
4 files changed, 6 insertions, 8 deletions
diff --git a/libc/bionic/libc_init_common.h b/libc/bionic/libc_init_common.h
index 23ac305..14105f8 100644
--- a/libc/bionic/libc_init_common.h
+++ b/libc/bionic/libc_init_common.h
@@ -50,7 +50,7 @@ __END_DECLS
#if defined(__cplusplus)
struct KernelArgumentBlock;
-void __libc_init_common(KernelArgumentBlock& args);
+void __LIBC_HIDDEN__ __libc_init_common(KernelArgumentBlock& args);
#endif
#endif
diff --git a/libc/bionic/libc_init_dynamic.cpp b/libc/bionic/libc_init_dynamic.cpp
index af03fb0..88e87a7 100644
--- a/libc/bionic/libc_init_dynamic.cpp
+++ b/libc/bionic/libc_init_dynamic.cpp
@@ -63,9 +63,7 @@ extern "C" {
// that its address is listed in libc.so's .init_array section.
// This ensures that the function is called by the dynamic linker
// as soon as the shared library is loaded.
-void __attribute__((constructor)) __libc_preinit(void);
-
-void __libc_preinit() {
+__attribute__((constructor)) static void __libc_preinit() {
// Read the kernel argument block pointer from TLS.
void* tls = const_cast<void*>(__get_tls());
KernelArgumentBlock** args_slot = &reinterpret_cast<KernelArgumentBlock**>(tls)[TLS_SLOT_BIONIC_PREINIT];
@@ -82,7 +80,7 @@ void __libc_preinit() {
malloc_debug_init();
}
-void __libc_postfini() {
+__LIBC_HIDDEN__ void __libc_postfini() {
// A hook for the debug malloc library to let it know that we're shutting down.
malloc_debug_fini();
}
diff --git a/libc/bionic/pthread_key.cpp b/libc/bionic/pthread_key.cpp
index b01f9bd..c793fc6 100644
--- a/libc/bionic/pthread_key.cpp
+++ b/libc/bionic/pthread_key.cpp
@@ -185,8 +185,8 @@ class ScopedTlsMapAccess {
}
};
-tls_map_t ScopedTlsMapAccess::s_tls_map_;
-pthread_mutex_t ScopedTlsMapAccess::s_tls_map_lock_;
+__LIBC_HIDDEN__ tls_map_t ScopedTlsMapAccess::s_tls_map_;
+__LIBC_HIDDEN__ pthread_mutex_t ScopedTlsMapAccess::s_tls_map_lock_;
__LIBC_HIDDEN__ void pthread_key_clean_all() {
ScopedTlsMapAccess tls_map;
diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h
index dd6b932..56a0ac2 100644
--- a/libc/private/bionic_tls.h
+++ b/libc/private/bionic_tls.h
@@ -114,7 +114,7 @@ __END_DECLS
#if defined(__cplusplus)
struct KernelArgumentBlock;
-extern void __libc_init_tls(KernelArgumentBlock& args);
+extern __LIBC_HIDDEN__ void __libc_init_tls(KernelArgumentBlock& args);
#endif
#endif /* _SYS_TLS_H */