summaryrefslogtreecommitdiffstats
path: root/libc/bionic/libc_init_dynamic.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-03-15 16:31:09 -0700
committerElliott Hughes <enh@google.com>2013-03-15 16:31:09 -0700
commitce532721aaf61d4b6a171903c851ac82adf08aa8 (patch)
tree79938358ba4dc34a795aeab6026ec06a6a811591 /libc/bionic/libc_init_dynamic.cpp
parentc14166477e7fd22693eab194d37624c2f7506ce4 (diff)
downloadbionic-ce532721aaf61d4b6a171903c851ac82adf08aa8.zip
bionic-ce532721aaf61d4b6a171903c851ac82adf08aa8.tar.gz
bionic-ce532721aaf61d4b6a171903c851ac82adf08aa8.tar.bz2
Hide various symbols that shouldn't be exposed.
A mangled symbol in libc.so is a symbol that shouldn't be exported by libc.so. Change-Id: Id92d1e1968b3d11d111a5d9ef692adb1ac7694a1
Diffstat (limited to 'libc/bionic/libc_init_dynamic.cpp')
-rw-r--r--libc/bionic/libc_init_dynamic.cpp6
1 files changed, 2 insertions, 4 deletions
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();
}