OSDN Git Service

Hide the symbol of helper function __libc_android_abort
authorJim Huang <jserv@0xlab.org>
Mon, 27 Sep 2010 11:23:06 +0000 (19:23 +0800)
committerJim Huang <jserv@0xlab.org>
Mon, 27 Sep 2010 14:20:59 +0000 (22:20 +0800)
Ideally __libc_android_abort would be static, but it could not be
because gcc would not allow calling a static function from an asm
statement.  Instead, using GCC visibility is work around.

Change-Id: Ifff6b9957ca3f0fc03c75c3e42582a48d43cefa2

libc/include/sys/cdefs_elf.h
libc/unistd/abort.c

index e051b1d..1e57470 100644 (file)
        __asm__(".section _sec\n\t.asciz _str\n\t.previous")
 #endif
 
+/* GCC visibility helper macro */
+#define __LIBC_HIDDEN__                                                        \
+       __attribute__ ((visibility ("hidden")))
+
 #define        __IDSTRING(_n,_s)               __SECTIONSTRING(.ident,_s)
 
 #define        __RCSID(_s)                     __IDSTRING(rcsid,_s)
index 3e3aab0..8b8659b 100644 (file)
@@ -40,7 +40,7 @@
     __libc_android_log_print(ANDROID_LOG_DEBUG, "libc-abort", (format), ##__VA_ARGS__ )
 
 #ifdef __arm__
-void
+__LIBC_HIDDEN__ void
 __libc_android_abort(void)
 #else
 void