@@ -36,5 +36,17 @@ ___asprintf_chk (char **result_ptr, int flag, const char *format, ...)
return ret;
}
+#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+/* This is needed since <bits/stdio-lbdl.h> is included in this case, leading to
+ * multiple asm redirection of the same symbol
+ */
ldbl_hidden_def (___asprintf_chk, __asprintf_chk)
ldbl_strong_alias (___asprintf_chk, __asprintf_chk)
+#else
+/* Yet, we can't use ldbl_* macros on some systems, even if they don't fall in
+ * the first case as this leads to ABI breakage due to the long_double_symbol
+ * aliasing, which is versionned.
+ */
+strong_alias (___asprintf_chk, __asprintf_chk)
+libc_hidden_builtin_def (__asprintf_chk)
+#endif
@@ -279,7 +279,12 @@ rtld_hidden_proto (__libc_fatal)
libc_hidden_proto (__fgets_unlocked_chk)
+#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
libc_hidden_ldbl_proto (__asprintf_chk)
+#else
+libc_hidden_proto (__asprintf_chk)
+#endif
+
libc_hidden_ldbl_proto (__fprintf_chk)
libc_hidden_ldbl_proto (__sprintf_chk)
libc_hidden_ldbl_proto (__vsprintf_chk)