aboutsummaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/cdefs.h20
-rw-r--r--include/sys/syslog.h2
2 files changed, 21 insertions, 1 deletions
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index 524fe57a25..9f44ac5a0a 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -13,6 +13,26 @@ extern void __chk_fail (void) __attribute__ ((__noreturn__));
libc_hidden_proto (__chk_fail)
rtld_hidden_proto (__chk_fail)
+/* If we are using redirects internally to support long double,
+ we need to tweak some macros to ensure the PLT bypass tricks
+ continue to work in libc. */
+#if __LONG_DOUBLE_USES_FLOAT128 == 1 && IS_IN (libc) && defined SHARED
+
+# undef __LDBL_REDIR_DECL
+# define __LDBL_REDIR_DECL(func) \
+ extern __typeof(func) func __asm (__ASMNAME ("__GI____ieee128_" #func));
+
+# undef libc_hidden_ldbl_proto
+# define libc_hidden_ldbl_proto(func, attrs...) \
+ extern __typeof(func) ___ieee128_ ## func; \
+ libc_hidden_proto (___ieee128_ ## func, ##attrs);
+
+# undef __LDBL_REDIR2_DECL
+# define __LDBL_REDIR2_DECL(func) \
+ extern __typeof(__ ## func) __ ## func __asm (__ASMNAME ("__GI____ieee128___" #func));
+
#endif
+#endif /* !defined _ISOMAC */
+
#endif
diff --git a/include/sys/syslog.h b/include/sys/syslog.h
index 89d3479ebc..44422eab13 100644
--- a/include/sys/syslog.h
+++ b/include/sys/syslog.h
@@ -3,7 +3,7 @@
#include <misc/sys/syslog.h>
#ifndef _ISOMAC
-libc_hidden_proto (syslog)
+libc_hidden_ldbl_proto (syslog)
/* __vsyslog_internal uses the same mode_flags bits as
__v*printf_internal; see libio/libioP.h. */