[PATCH 01/13] ldbl-128ibm-compat: PLT redirects for using ldbl redirects internally
Paul E Murphy
murphyp@linux.ibm.com
Mon Mar 16 17:29:35 GMT 2020
Ping?
On 3/6/20 2:37 PM, Paul E. Murphy wrote:
> 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.
> ---
> include/err.h | 12 ++---
> include/libc-symbols.h | 2 +
> include/stdio.h | 52 +++++++++++++------
> include/sys/cdefs.h | 20 +++++++
> include/sys/syslog.h | 2 +-
> include/wchar.h | 2 +-
> .../ldbl-128ibm-compat/ieee128-asprintf.c | 5 +-
> .../ldbl-128ibm-compat/ieee128-dprintf.c | 1 +
> .../ieee754/ldbl-128ibm-compat/ieee128-err.c | 7 +++
> .../ldbl-128ibm-compat/ieee128-fprintf.c | 1 +
> .../ieee128-isoc99_sscanf.c | 1 +
> .../ieee128-isoc99_vfscanf.c | 2 +
> .../ieee128-isoc99_vsscanf.c | 1 +
> .../ldbl-128ibm-compat/ieee128-sprintf.c | 1 +
> .../ldbl-128ibm-compat/ieee128-syslog.c | 1 +
> .../ldbl-128ibm-compat/ieee128-vfprintf.c | 1 +
> .../ldbl-128ibm/include/bits/iscanonical.h | 2 +-
> 17 files changed, 87 insertions(+), 26 deletions(-)
More information about the Libc-alpha
mailing list