about summary refs log tree commit diff
path: root/sysdeps/generic/symbol-hacks.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/symbol-hacks.h')
-rw-r--r--sysdeps/generic/symbol-hacks.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 1115e4c0a7..560116d575 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -6,6 +6,13 @@ asm ("memmove = __GI_memmove");
 asm ("memset = __GI_memset");
 asm ("memcpy = __GI_memcpy");
 
+/* clang might generate an abort call when cleanup functions (set by
+   __attribute__ ((cleanup)) calls functions not marked as nothrow.
+   We can mitigate by marking some internal functions as __THROW,
+   but it is not possible for functions that issue used-provided
+   callbacks (for instance pthread_once).  */
+asm ("abort = __GI_abort");
+
 /* Some targets do not use __stack_chk_fail_local.  In libc.so,
    redirect __stack_chk_fail to a hidden reference
    __stack_chk_fail_local, to avoid the PLT reference.