diff options
author | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2020-02-07 14:07:55 -0600 |
---|---|---|
committer | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2020-03-25 14:34:23 -0500 |
commit | 45ae17dd7ed3b9dea0d698d1c37a978d8d0a9aa2 (patch) | |
tree | 3bcf36847e060d0af834270805e9cddf76cc178e /sysdeps/ieee754 | |
parent | 4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9 (diff) | |
download | glibc-45ae17dd7ed3b9dea0d698d1c37a978d8d0a9aa2.tar.gz glibc-45ae17dd7ed3b9dea0d698d1c37a978d8d0a9aa2.tar.xz glibc-45ae17dd7ed3b9dea0d698d1c37a978d8d0a9aa2.zip |
ldbl-128ibm-compat: PLT redirects for using ldbl redirects internally
Tweak the PLT bypass magic when building glibc with long double redirects. This is made more difficult by the fact we only get one chance to redirect functions. This happens via the public headers. There are roughly three classes of redirect we need to attend to today: 1. Simple redirects, redirected via cdef macro overrides and and new libc_hidden_ldbl_proto macro. 2. Internal usage of internal API, e.g __snprintf, which has no direct analogue. This is bypassed directly on case-by- case basis. 3. Double redirects, e.g sscanf and related. These require a heavier handed approach of macro renaming to existing symbols. Most simple redirects are handled via 1. Ideally, the libc_* macro would live in libc-symbols.h, but in practice the macros needed for it to do anything useful live in cdefs.h, so they are defined in the local override. Notably, the internal name of the asprintf generated for ieee ldbl redirects is renamed to work with internal prefixed usage. This resolves the local plt usage introduced when building glibc with ldbl == ieee128 on ppc64le. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'sysdeps/ieee754')
11 files changed, 20 insertions, 3 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-asprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-asprintf.c index 68cafbb2fa..2a6ed2f813 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-asprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-asprintf.c @@ -20,7 +20,7 @@ #include <libio/libioP.h> extern int -___ieee128_asprintf (char **string_ptr, const char *format, ...) +___ieee128___asprintf (char **string_ptr, const char *format, ...) { va_list ap; int done; @@ -32,4 +32,5 @@ ___ieee128_asprintf (char **string_ptr, const char *format, ...) return done; } -strong_alias (___ieee128_asprintf, __asprintfieee128) +hidden_def (___ieee128___asprintf) +strong_alias (___ieee128___asprintf, __asprintfieee128) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-dprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-dprintf.c index 9dc65309bd..87440c9850 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-dprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-dprintf.c @@ -32,3 +32,4 @@ ___ieee128_dprintf (int d, const char *format, ...) return done; } strong_alias (___ieee128_dprintf, __dprintfieee128) +hidden_def (___ieee128_dprintf); diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-err.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-err.c index eae071b9c4..f81d3edcbf 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-err.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-err.c @@ -91,3 +91,10 @@ IEEE128_DECL (errx) (int status, const char *format, ...) VA (verrx (status, format, ap)) } IEEE128_ALIAS (errx) + +hidden_def (___ieee128_warn) +hidden_def (___ieee128_warnx) +hidden_def (___ieee128_vwarn) +hidden_def (___ieee128_vwarnx) +hidden_def (___ieee128_verr) +hidden_def (___ieee128_verrx) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c index e1c989643e..b05e6f1bc6 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-fprintf.c @@ -32,3 +32,4 @@ ___ieee128_fprintf (FILE *fp, const char *format, ...) return done; } strong_alias (___ieee128_fprintf, __fprintfieee128) +hidden_def (___ieee128_fprintf) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_sscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_sscanf.c index bfc7270a78..cd1c9fa333 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_sscanf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_sscanf.c @@ -37,3 +37,4 @@ ___ieee128_isoc99_sscanf (const char *string, const char *format, ...) return done; } strong_alias (___ieee128_isoc99_sscanf, __isoc99_sscanfieee128) +hidden_def (___ieee128_isoc99_sscanf) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vfscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vfscanf.c index b561fa3044..2a11f49ea6 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vfscanf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vfscanf.c @@ -17,6 +17,7 @@ <https://www.gnu.org/licenses/>. */ #include <libio/libioP.h> +#include <stdio.h> extern int ___ieee128_isoc99_vfscanf (FILE *fp, const char *format, va_list ap) @@ -25,3 +26,4 @@ ___ieee128_isoc99_vfscanf (FILE *fp, const char *format, va_list ap) return __vfscanf_internal (fp, format, ap, mode_flags); } strong_alias (___ieee128_isoc99_vfscanf, __isoc99_vfscanfieee128) +hidden_def (___ieee128_isoc99_vfscanf) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vsscanf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vsscanf.c index bef6ebcce0..d976cdbe1f 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vsscanf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-isoc99_vsscanf.c @@ -28,3 +28,4 @@ ___ieee128_isoc99_vsscanf (const char *string, const char *format, va_list ap) return __vfscanf_internal (fp, format, ap, mode_flags); } strong_alias (___ieee128_isoc99_vsscanf, __isoc99_vsscanfieee128) +hidden_def (___ieee128_isoc99_vsscanf) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c index 52088cd576..690dc3abf1 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-sprintf.c @@ -33,3 +33,4 @@ ___ieee128_sprintf (char *s, const char *format, ...) return done; } strong_alias (___ieee128_sprintf, __sprintfieee128) +hidden_def (___ieee128_sprintf) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-syslog.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-syslog.c index 914f24aebd..4af546326c 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-syslog.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-syslog.c @@ -30,6 +30,7 @@ ___ieee128_syslog (int pri, const char *fmt, ...) va_end (ap); } strong_alias (___ieee128_syslog, __syslogieee128) +hidden_def (___ieee128_syslog) void ___ieee128_vsyslog (int pri, const char *fmt, va_list ap) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfprintf.c b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfprintf.c index 234cd9de8d..b407eae969 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfprintf.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/ieee128-vfprintf.c @@ -24,3 +24,4 @@ ___ieee128_vfprintf (FILE *fp, const char *format, va_list ap) return __vfprintf_internal (fp, format, ap, PRINTF_LDBL_USES_FLOAT128); } strong_alias (___ieee128_vfprintf, __vfprintfieee128) +hidden_def (___ieee128_vfprintf) diff --git a/sysdeps/ieee754/ldbl-128ibm/include/bits/iscanonical.h b/sysdeps/ieee754/ldbl-128ibm/include/bits/iscanonical.h index bee080bd29..8cbd6f74bf 100644 --- a/sysdeps/ieee754/ldbl-128ibm/include/bits/iscanonical.h +++ b/sysdeps/ieee754/ldbl-128ibm/include/bits/iscanonical.h @@ -1,5 +1,5 @@ #include_next <bits/iscanonical.h> -#ifndef _ISOMAC +#if !defined _ISOMAC && (__LONG_DOUBLE_USES_FLOAT128 == 0) libm_hidden_proto (__iscanonicall) #endif |