summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 312be56)
raw | patch | inline | side by side (parent: 312be56)
author | Jim Huang <jserv@0xlab.org> | |
Mon, 27 Sep 2010 11:23:06 +0000 (19:23 +0800) | ||
committer | Jim 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
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 | patch | blob | history | |
libc/unistd/abort.c | patch | blob | history |
index e051b1d0edd5217a269402e0598579095cfdd79b..1e5747010a740a4cbeabb7195dbab38c32899130 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)
diff --git a/libc/unistd/abort.c b/libc/unistd/abort.c
index 3e3aab0ea1b96ba27aef40d12fa73a46545767c4..8b8659b8bc77d8f957b67a66690ac46d6f710aa0 100644 (file)
--- a/libc/unistd/abort.c
+++ b/libc/unistd/abort.c
__libc_android_log_print(ANDROID_LOG_DEBUG, "libc-abort", (format), ##__VA_ARGS__ )
#ifdef __arm__
-void
+__LIBC_HIDDEN__ void
__libc_android_abort(void)
#else
void