diff options
Diffstat (limited to 'lib/int_util.c')
-rw-r--r-- | lib/int_util.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/int_util.c b/lib/int_util.c index 871d191658cb1..323e46179e6cf 100644 --- a/lib/int_util.c +++ b/lib/int_util.c @@ -24,31 +24,36 @@ #ifdef KERNEL_USE extern void panic(const char *, ...) __attribute__((noreturn)); +#ifndef _WIN32 __attribute__((visibility("hidden"))) +#endif void compilerrt_abort_impl(const char *file, int line, const char *function) { panic("%s:%d: abort in %s", file, line, function); } -#elif __APPLE__ && !__STATIC__ +#elif __APPLE__ /* from libSystem.dylib */ extern void __assert_rtn(const char *func, const char *file, int line, const char * message) __attribute__((noreturn)); +#ifndef _WIN32 __attribute__((weak)) __attribute__((visibility("hidden"))) +#endif void compilerrt_abort_impl(const char *file, int line, const char *function) { __assert_rtn(function, file, line, "libcompiler_rt abort"); } - #else /* Get the system definition of abort() */ #include <stdlib.h> +#ifndef _WIN32 __attribute__((weak)) __attribute__((visibility("hidden"))) +#endif void compilerrt_abort_impl(const char *file, int line, const char *function) { abort(); } |