| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes dbl-64 modf use libm_alias_double. Both the dbl-64
and dbl-64/wordsize-64 versions are changed, and the ldbl-opt version
is changed to define the libc compat symbol only. Because of
multiarch wrappers, the changed implementations are made not to define
aliases at all if __modf is defined as a macro, as with other
functions, so avoiding duplicate compat symbols while allowing those
wrappers to be simplified.
Tested for x86_64, and verified with build-many-glibcs.py that
installed stripped shared libraries are unchanged by the patch.
* sysdeps/ieee754/dbl-64/s_modf.c: Include <libm-alias-double.h>.
(modf): Define using libm_alias_double, only if [!__modf].
* sysdeps/ieee754/dbl-64/wordsize-64/s_modf.c: Include
<libm-alias-double.h>.
(modf): Define using libm_alias_double, only if [!__modf].
* sysdeps/ieee754/ldbl-opt/s_modf.c (modfl): Only define libc
compat symbol here.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-ppc32.c
(weak_alias): Do not undefine and redefine.
(strong_alias): Likewise.
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-ppc64.c
(weak_alias): Likewise.
(strong_alias): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes dbl-64 logb use libm_alias_double. Both the dbl-64
and dbl-64/wordsize-64 versions are changed, and the ldbl-opt version
is removed. Because of multiarch wrappers, the changed
implementations are made not to define aliases at all if __logb is
defined as a macro, as with other functions, so avoiding duplicate
compat symbols while allowing those wrappers to be simplified.
Tested for x86_64, and verified with build-many-glibcs.py that
installed stripped shared libraries are unchanged (except on alpha
where changes from using the wordsize-64 version are expected).
* sysdeps/ieee754/dbl-64/s_logb.c: Include <libm-alias-double.h>.
(logb): Define using libm_alias_double, only if [!__logb].
* sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c: Include
<libm-alias-double.h>.
(logb): Define using libm_alias_double, only if [!__logb].
* sysdeps/ieee754/ldbl-opt/s_logb.c: Remove file.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-ppc32.c
(weak_alias): Do not undefine and redefine.
(strong_alias): Likewise.
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-ppc64.c
(weak_alias): Likewise.
(strong_alias): Likewise.
|
|
|
|
|
|
|
|
| |
For static PIE code, PIC is defined and SHARED is undefined. We
should check SHARED instead PIC for SYSCALL_ERROR_NAME.
* sysdeps/unix/sysv/linux/tile/sysdep.h (SYSCALL_ERROR_NAME):
Check SHARED instead PIC.
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes the implementation of fmaf in the dbl-64 directory
use libm_alias float.
Tested for x86_64, and verified with build-many-glibcs.py that
installed stripped shared libraries are unchanged by this patch.
* sysdeps/ieee754/dbl-64/s_fmaf.c: Include <libm-alias-float.h>.
[!__fmaf] (fmaf): Define using libm_alias_float.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes dbl-64 frexp use libm_alias_double. Both the dbl-64
and dbl-64/wordsize-64 versions are changed; the ldbl-opt version is
made to define only the libc frexpl compat symbol, now the generic
code handles the libm compat symbol automatically.
Tested for x86_64, and verified with build-many-glibcs.py that
installed stripped shared libraries are unchanged by this patch.
* sysdeps/ieee754/dbl-64/s_frexp.c: Include <libm-alias-double.h>.
(frexp): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c: Include
<libm-alias-double.h>.
(frexp): Define using libm_alias_double.
* sysdeps/ieee754/ldbl-opt/s_frexp.c (frexpl): Only define libc
compat symbol here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All representations of floating-point numbers in types with IEC 60559
binary exchange format are canonical. On the other hand, types with IEC
60559 extended formats, such as those implemented under ldbl-96 and
ldbl-128ibm, contain representations that are not canonical.
TS 18661-1 introduced the type-generic macro iscanonical, which returns
whether a floating-point value is canonical or not. In Glibc, this
type-generic macro is implemented using the macro __MATH_TG, which, when
support for float128 is enabled, relies on __builtin_types_compatible_p
to select between floating-point types. However, this use of
iscanonical breaks C++ applications, because the builtin is only
available in C mode.
This patch provides a C++ implementation of iscanonical that relies on
function overloading, rather than builtins, to select between
floating-point types.
Unlike the C++ implementations for iszero and issignaling, this
implementation ignores __NO_LONG_DOUBLE_MATH. The double type always
matches IEC 60559 double format, which is always canonical. Thus, when
double and long double are the same (__NO_LONG_DOUBLE_MATH), iscanonical
always returns 1 and is not implemented with __MATH_TG.
Tested for powerpc64, powerpc64le and x86_64.
[BZ #22235]
* math/math.h: Trivial fix for unbalanced parentheses in comment.
* math/Makefile [CXX] (tests): Add test-math-iscanonical.cc.
(CFLAGS-test-math-iscanonical.cc): New variable.
* math/test-math-iscanonical.cc: New file.
* sysdeps/ieee754/ldbl-96/bits/iscanonical.h (iscanonical):
Provide a C++ implementation based on function overloading,
rather than using __MATH_TG, which uses C-only builtins.
* sysdeps/ieee754/ldbl-128ibm/bits/iscanonical.h (iscanonical):
Likewise.
* sysdeps/powerpc/powerpc64le/Makefile
(CFLAGS-test-math-iscanonical.cc): New variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes more dbl-64 functions use libm_alias_double to define
function aliases. Specifically, it makes the change for functions
with dbl-64/wordsize-64 versions, changing both the dbl-64 and
dbl-64/wordsize-64 versions and removing the ldbl-opt wrappers.
Functions are excluded from this patch if there are complications
because of versions of those functions also present in libc, or
architecture-specific wrappers round these files.
Tested for x86_64, and with build-many-glibcs.py. Installed stripped
shared libraries are unchanged except for alpha (where increased use
of dbl-64/wordsize-64 files, where previously ldbl-opt files that
wrapped dbl-64 files were used, was expected to result in different,
better code).
* sysdeps/ieee754/dbl-64/s_ceil.c: Include <libm-alias-double.h>.
(ceil): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_floor.c: Include <libm-alias-double.h>.
(floor): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_llround.c: Include
<libm-alias-double.h>.
(llround): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_lround.c: Include
<libm-alias-double.h>.
(lround): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_nearbyint.c: Include
<libm-alias-double.h>.
(nearbyint): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_remquo.c: Include
<libm-alias-double.h>.
(remquo): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_rint.c: Include <libm-alias-double.h>.
(rint): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_round.c: Include <libm-alias-double.h>.
(round): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_trunc.c: Include <libm-alias-double.h>.
(trunc): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Include
<libm-alias-double.h>.
(ceil): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c: Include
<libm-alias-double.h>.
(floor): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c: Include
<libm-alias-double.h>.
(llround): Define using libm_alias_double.
[_LP64] (lround): Likewise.
* sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: Include
<libm-alias-double.h>.
[!_LP64] (lround): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c: Include
<libm-alias-double.h>.
(nearbyint): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c: Include
<libm-alias-double.h>.
(remquo): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c: Include
<libm-alias-double.h>.
(rint): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_round.c: Include
<libm-alias-double.h>.
(round): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c: Include
<libm-alias-double.h>.
(trunc): Define using libm_alias_double.
* sysdeps/ieee754/ldbl-opt/s_ceil.c: Remove file.
* sysdeps/ieee754/ldbl-opt/s_floor.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_llround.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_lround.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_nearbyint.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_remquo.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_rint.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_round.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_trunc.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(&_dl_main_map) is used instead of (&bootstrap_map) to bootstrap static
PIE. Define BOOTSTRAP_MAP with (&_dl_main_map) to avoid hardcode to
(&bootstrap_map).
* elf/rtld.c (BOOTSTRAP_MAP): New.
(RESOLVE_MAP): Replace (&bootstrap_map) with BOOTSTRAP_MAP.
* sysdeps/hppa/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
Likewise.
* sysdeps/ia64/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
Likewise.
* sysdeps/mips/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On the Hurd, the rtld needs to see its own dumb versions of a few functions
(defined in sysdeps/mach/hurd/dl-sysdep.c) overridden by libc's versions once
loaded. rtld should thus not have hidden attribute for these. To achieve this,
the Hurd port used to just define NO_HIDDEN, which disables it completely. For
now, this changes that to disabling it for all rtld functions, for simplicity.
See Roland's comment on https://sourceware.org/bugzilla/show_bug.cgi?id=15605#c5
The ld.so numbers remain at
8 .rel.plt 000000c8 00000c24 00000c24 00000c24 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .plt 000001a0 00000cf0 00000cf0 00000cf0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
10 .plt.got 00000010 00000e90 00000e90 00000e90 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
18 .got.plt 00000070 0002d000 0002d000 0002c000 2**2
CONTENTS, ALLOC, LOAD, DATA
which is about 3 times as much as on Linux.
The libc.so numbers get divided by 3 (the remainings are mostly RPC stub calls)
* include/libc-symbols.h [NO_RTLD_HIDDEN] (rtld_hidden_proto,
rtld_hidden_tls_proto, rtld_hidden_def, rtld_hidden_weak,
rtld_hidden_rtld_hidden_ver, data_def, rtld_hidden_data_weak,
rtld_hidden_data_ver): Define to empty.
* include/assert.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__assert_fail,
__assert_perror_fail): Likewise.
* include/dirent.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(__rewinddir): Likewise.
* include/libc-internal.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(__profile_frequency): Likewise.
* include/setjmp.h (__sigsetjmp): Likewise.
* include/signal.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__sigaction,
__libc_sigaction): Likewise.
* include/stdlib.h [NO_RTLD_HIDDEN] (unsetenv, __strtoul_internal): Do
not set hidden attribute.
* include/string.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__stpcpy, __strdup,
__strerror_t, __strsep_g, memchr, memcmp, memcpy, memmove, memset,
rawmemchr, stpcpy, strchr, strcmp, strlen, strnlen, strsep): Likewise.
* include/sys/stat.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__fxstat,
__fxstat64, __lxstat, __lxstat64, __xstat, __xstat64,
__fxstatat64): Likewise.
* include/sys/utsname.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(__uname): Likewise.
* include/sysdeps/generic/_itoa.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(_itoa_upper_digits, _itoa_lower_digits): Likewise.
* sysdeps/mach/hurd/configure.ac (NO_HIDDEN): Do not set.
(NO_RTLD_HIDDEN): Set.
* sysdeps/mach/hurd/configure: Refresh.
* config.h.in: Refresh.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes the dbl-64 atan and tan implementations use
libm_alias_double, removing the corresponding ldbl-opt wrappers.
Tested for x86_64, and with build-many-glibcs.py. Installed stripped
shared libraries are unchanged on non-ldbl-opt platforms. For
ldbl-opt configurations, the patch has the effect of causing
compat_symbol to define atanl and tanl in terms of __atan and __tan
instead of in terms of atan and tan, which is enough to change the
installed stripped libm.so.
* sysdeps/ieee754/dbl-64/s_atan.c: Include <libm-alias-double.h>.
(atan): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_tan.c: Include <libm-alias-double.h>.
(tan): Define using libm_alias_double.
* sysdeps/ieee754/ldbl-opt/s_atan.c: Remove file.
* sysdeps/ieee754/ldbl-opt/s_tan.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch converts the dbl-64 implementations of atan and tan into
weak aliases of __atan and __tan, in preparation for making them use
libm_alias_double. Consequent changes are made to the x86_64
multiarch versions wrapping round them (with the dbl-64 functions,
like other such functions, being made not to define their aliases at
all if __atan or __tan are defined as macros by an including file).
Tested for x86_64, and with build-many-glibcs.py.
* sysdeps/ieee754/dbl-64/s_atan.c (atan): Rename to __atan and
define as weak alias of __atan. Do not define any aliases if
[__atan].
[NO_LONG_DOUBLE] (__atanl): Define as strong alias of __atan.
[NO_LONG_DOUBLE] (atanl): Define as weak alias of __atanl.
* sysdeps/ieee754/dbl-64/s_tan.c (tan): Rename to __tan and define
as weak alias of __tan. Do not define any aliases if [__tan].
[NO_LONG_DOUBLE] (__tanl): Define as strong alias of __tan.
[NO_LONG_DOUBLE] (tanl): Define as weak alias of __tanl.
* sysdeps/x86_64/fpu/multiarch/s_atan-avx.c (atan): Rename to
__atan.
* sysdeps/x86_64/fpu/multiarch/s_atan-fma.c (atan): Likewise.
* sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c (atan): Likewise.
* sysdeps/x86_64/fpu/multiarch/s_atan.c (atan): Rename to __atan
and define as weak alias of __atan.
* sysdeps/x86_64/fpu/multiarch/s_tan-avx.c (tan): Rename to
__atan.
* sysdeps/x86_64/fpu/multiarch/s_tan-fma.c (tan): Likewise.
* sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c (tan): Likewise.
* sysdeps/x86_64/fpu/multiarch/s_tan.c (tan): Rename to __tan and
define as weak alias of __tan.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new generic logf, log2f and powf code don't need wrappers any more,
they set errno inline so only use the wrappers on targets that need it.
* sysdeps/ieee754/flt-32/e_log2f.c (__log2f): Define without wrapper.
* sysdeps/ieee754/flt-32/e_logf.c (__logf): Likewise
* sysdeps/ieee754/flt-32/e_powf.c (__powf): Likewise
* sysdeps/ieee754/flt-32/w_log2f.c: New file.
* sysdeps/ieee754/flt-32/w_logf.c: New file.
* sysdeps/ieee754/flt-32/w_powf.c: New file.
* sysdeps/i386/fpu/w_log2f.c: New file.
* sysdeps/i386/fpu/w_logf.c: New file.
* sysdeps/i386/fpu/w_powf.c: New file.
* sysdeps/m68k/m680x0/fpu/w_log2f.c: New file.
* sysdeps/m68k/m680x0/fpu/w_logf.c: New file.
* sysdeps/m68k/m680x0/fpu/w_powf.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new generic expf and exp2f code don't need wrappers any more, they
set errno inline, so only use the wrappers on targets that need it.
(If the wrapper is needed, then the top level wrapper code is included,
otherwise empty w_exp*f.c is used to suppress the wrapper.)
A powerpc64 expf implementation includes the expf c code directly which
needed some changes.
* sysdeps/ieee754/flt-32/e_exp2f.c (__exp2f): Define without wrapper.
* sysdeps/ieee754/flt-32/e_expf.c (__expf): Likewise
* sysdeps/ieee754/flt-32/w_exp2f.c: New file.
* sysdeps/ieee754/flt-32/w_expf.c: New file.
* sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-ppc64.c: Update for
the new expf code.
* sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c: New file.
* sysdeps/powerpc/powerpc64/power8/fpu/w_expf.c: New file.
* sysdeps/m68k/m680x0/fpu/w_exp2f.c: New file.
* sysdeps/m68k/m680x0/fpu/w_expf.c: New file.
* sysdeps/i386/fpu/w_exp2f.c: New file.
* sysdeps/i386/fpu/w_expf.c: New file.
* sysdeps/i386/i686/fpu/multiarch/w_expf.c: New file.
* sysdeps/x86_64/fpu/w_expf.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the logf, log2f and powf error handling semantics
to only set errno accoring to POSIX rules. New symbol version is
introduced at GLIBC_2.27.
The old wrappers are kept for compat symbols.
ia64 needed assembly change to have the new and compat versioned
symbol map to the same function.
All linux libm abilists are updated.
* math/Versions (logf): New libm symbol at GLIBC_2.27.
(log2f): Likewise.
(powf): Likewise.
* math/w_log2f.c: New file.
* math/w_logf.c: New file.
* math/w_powf.c: New file.
* math/w_log2f_compat.c (__log2f_compat): For compat symbol only.
* math/w_logf_compat.c (__logf_compat): Likewise.
* math/w_powf_compat.c (__powf_compat): Likewise.
* sysdeps/ia64/fpu/e_log2f.S: Add versioned symbols.
* sysdeps/ia64/fpu/e_logf.S: Likewise.
* sysdeps/ia64/fpu/e_powf.S: Likewise.
* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Update.
* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist:
Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
|
|
|
|
|
|
|
| |
Vectorized loops are used for sizes greater than 32B to improve
performance over power7 optimization. This shows as an average
of 25% improvement depending on the position of search
character. The performance is same for shorter strings.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal fadvise64/fallocate64 functions to allow direct access
within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/posix_fadvise64.c
(__posix_fadvise64_l64): Add Add libc_hidden_proto and
libc_hidden_def.
* sysdeps/unix/sysv/linux/posix_fallocate64.c
(__posix_fallocate64_l64): Likewise.
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __sched_setaffinity_new function to allow direct access
within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/sched_setaffinity.c
(__sched_setaffinity_new): Add libc_hidden_proto and
libc_hidden_def.
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __glob64 function to allow direct access within libc.so
and libc.a without using GOT nor PLT.
[BZ #18822]
* include/glob.h (__glob64): Add libc_hidden_proto.
* sysdeps/unix/sysv/linux/glob64.c (__glob64): Add
libc_hidden_def.
|
|
|
|
|
|
|
|
|
| |
Hide internal __new_getrlimit function to allow direct access within
libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/getrlimit64.c (__new_getrlimit): Add
attribute_hidden.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __tcgetattr function to allow direct access within libc.so
and libc.a without using GOT nor PLT.
[BZ #18822]
* include/termios.h (__tcgetattr): Add libc_hidden_proto.
* sysdeps/unix/bsd/tcgetattr.c (__tcgetattr): Add
libc_hidden_def.
* sysdeps/unix/sysv/linux/tcgetattr.c (__tcgetattr): Likewise.
* termios/tcgetattr.c (__tcgetattr): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __setrlimit function to allow direct access within libc.so
and libc.a without using GOT nor PLT.
[BZ #18822]
* include/sys/resource.h (__setrlimit): Add libc_hidden_proto.
* resource/setrlimit.c (__setrlimit): Add libc_hidden_def.
* sysdeps/mach/hurd/setrlimit.c (__setrlimit): Likewise.
* sysdeps/unix/sysv/linux/setrlimit.c (__setrlimit): Likewise.
* sysdeps/unix/sysv/linux/setrlimit64.c (__GI___setrlimit): New.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __ifreq function to allow direct access within libc.so and
libc.a without using GOT nor PLT.
[BZ #18822]
* include/ifreq.h: New file.
* sysdeps/generic/ifreq.h (__if_nextreq): Removed.
(__ifreq): Likewise.
* sysdeps/mach/hurd/ifreq.h (__if_nextreq): Removed.
(__ifreq): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal idna functions to allow direct access within libc.so and
libc.a without using GOT nor PLT.
[BZ #18822]
* include/idna.h: New file.
* inet/getnameinfo.c: Include <idna.h> instead of
<libidn/idna.h>.
(__idna_to_unicode_lzlz): Removed.
* sysdeps/posix/getaddrinfo.c: Include <idna.h> instead of
<libidn/idna.h>.
(__idna_to_ascii_lz): Removed.
(__idna_to_unicode_lzlz): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __get_sol function to allow direct access within libc.so
and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/getsourcefilter.c: Include
"getsourcefilter.h".
* sysdeps/unix/sysv/linux/getsourcefilter.h: New file.
* sysdeps/unix/sysv/linux/setsourcefilter.c: Include
"getsourcefilter.h".
(__get_sol): Removed.
|
|
|
|
|
|
|
|
|
| |
Hide internal __bsd_getpt function to allow direct access within
libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/getpt.c (__bsd_getpt): Add
attribute_hidden.
|
|
|
|
|
|
|
|
|
| |
Hide internal __sysinfo function to allow direct access within libc.so and
libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/include/sys/sysinfo.h (__sysinfo): Add
attribute_hidden.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal signal functions to allow direct access within libc.so and
libc.a without using GOT nor PLT.
__GI___kill and __GI___sigaltstack are defined when syscalls.list is
used to generate them. Otherwise libc_hidden_def is needed explicitly.
[BZ #18822]
* include/signal.h (__kill): Add libc_hidden_proto.
(__sigblock): Likewise.
(__sigprocmask): Likewise.
(__sigaltstack): Likewise.
* signal/kill.c (__kill): Add libc_hidden_def.
* signal/sigblock.c (__sigblock): Likewise.
* signal/sigprocmask.c (__sigprocmask): Likewise.
* sysdeps/mach/hurd/kill.c (__kill): Likewise.
* sysdeps/mach/hurd/sigaltstack.c (__sigaltstack): Likewise.
* sysdeps/mach/hurd/sigprocmask.c (__sigprocmask): Likewise.
* sysdeps/posix/sigblock.c (__sigblock): Likewise.
* sysdeps/unix/sysv/linux/alpha/sigprocmask.c (__sigprocmask):
Likewise.
* sysdeps/unix/sysv/linux/ia64/sigprocmask.c (__sigprocmask):
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c
(__sigprocmask): Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask):
Likewise.
* /sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c
(__sigprocmask): Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigprocmask.c (__sigprocmask):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __mremap function to allow direct access within libc.so and
libc.a without using GOT nor PLT.
__GI___mremap is defined when sysdeps/unix/syscalls.list is used to
generate mremap. Otherwise libc_hidden_def is needed explicitly.
[BZ #18822]
* include/sys/mman.h (__mremap): Add libc_hidden_proto.
* sysdeps/unix/sysv/linux/m68k/mremap.S (__mremap): Add
libc_hidden_def.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __ioctl function to allow direct access within libc.so and
libc.a without using GOT nor PLT.
__GI___ioctl is defined when sysdeps/unix/syscalls.list is used to
generate ioctl. Otherwise libc_hidden_def is needed explicitly.
[BZ #18822]
* include/sys/ioctl.h (__ioctl): Add libc_hidden_proto.
* misc/ioctl.c (__ioctl): Add libc_hidden_def.
* sysdeps/mach/hurd/ioctl.c (__ioctl): Likewise.
* sysdeps/unix/sysv/linux/aarch64/ioctl.S (__ioctl): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/ioctl.c (__ioctl): Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/ioctl.S (__ioctl): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal sysinfo functions to allow direct access within libc.so
and libc.a without using GOT nor PLT.
[BZ #18822]
* include/sys/sysinfo.h (__get_nprocs_conf): Add
libc_hidden_proto.
(__get_nprocs): Likewise.
(__get_phys_pages): Likewise.
(__get_avphys_pages): Likewise.
(__get_child_max): Add attribute_hidden.
* misc/getsysstats.c (__get_nprocs_conf): Add libc_hidden_def.
(__get_nprocs): Likewise.
(__get_phys_pages): Likewise.
(__get_avphys_pages): Likewise.
* sysdeps/mach/getsysstats.c (__get_nprocs_conf): Add
libc_hidden_def.
(__get_nprocs): Likewise.
(__get_phys_pages): Likewise.
(__get_avphys_pages): Likewise.
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Add
libc_hidden_def.
(__get_nprocs_conf): Likewise.
(__get_phys_pages): Likewise.
(__get_avphys_pages): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark internal netlink functions with attribute_hidden to allow direct
access within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/netlinkaccess.h (__netlink_open): Add
attribute_hidden.
(__netlink_close): Likewise.
(__netlink_free_handle): Likewise.
(__netlink_request): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hide internal __readv and __writev functions to allow direct access
within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* include/sys/uio.h (__readv): Add libc_hidden_proto.
(__writev): Likewise.
* misc/readv.c (__readv): Add libc_hidden_def.
* misc/writev.c (__writev): Likewise.
* sysdeps/posix/readv.c (__readv): Likewise.
* sysdeps/posix/writev.c (__writev): Likewise.
* sysdeps/unix/sysv/linux/readv.c: Include <sys/uio.h>.
(__readv): Likewise.
* sysdeps/unix/sysv/linux/writev.c: Include <sys/uio.h>.
(__writev): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark internal dirent functions with attribute_hidden to allow direct
access within libc.so and libc.a without using GOT nor PLT. __readdir64
is hidden with libc_hidden_proto and libc_hidden_def since the exported
readdir64 is an alias of __readdir64.
[BZ #18822]
* include/dirent.h (__opendir): Always add attribute_hidden.
(__fdopendir): Likewise.
(__closedir): Likewise.
(__readdir): Likewise.
(__readdir64): Add libc_hidden_proto.
* sysdeps/mach/hurd/readdir64.c (__readdir64): Add libc_hidden_def.
* sysdeps/unix/sysv/linux/i386/readdir64.c (__readdir64): Likewise.
* sysdeps/unix/sysv/linux/readdir64.c (__readdir64): Likewise.
* sysdeps/unix/sysv/linux/wordsize-64/readdir.c (__GI___readdir64):
New alias.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark internal statfs functions with attribute_hidden to allow direct
access within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* include/sys/statfs.h (__fstatfs): Add attribute_hidden.
(__statfs64): Likewise.
(__fstatfs64): Likewise.
* include/sys/statvfs.h (__statvfs64): Likewise.
(__fstatvfs64): Likewise.
* sysdeps/unix/sysv/linux/pathconf.h (__statfs_link_max): Likewise.
(__statfs_filesize_max): Likewise.
(__statfs_symlinks): Likewise.
(__statfs_chown_restricted): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark ____wcsto*_l_internal functions with attribute_hidden to allow
direct access to them within libc.so and libc.a without using GOT nor
PLT.
[BZ #18822]
* include/wchar.h (____wcstof_l_internal): New prototype.
(____wcstod_l_internal): Likewise.
(____wcstold_l_internal): Likewise.
(____wcstol_l_internal): Likewise.
(____wcstoul_l_internal): Likewise.
(____wcstoll_l_internal): Likewise.
(____wcstoull_l_internal): Likewise.
(____wcstof128_l_internal): Likewise.
* sysdeps/ieee754/float128/wcstof128.c
(____wcstof128_l_internal): Removed.
* sysdeps/ieee754/float128/wcstof128_l.c
(____wcstof128_l_internal): Likewise.
* wcsmbs/wcstod.c (____wcstod_l_internal): Likewise.
* wcsmbs/wcstod_l.c (____wcstod_l_internal): Likewise.
* wcsmbs/wcstof.c (____wcstof_l_internal): Likewise.
* wcsmbs/wcstof_l.c (____wcstof_l_internal): Likewise.
* wcsmbs/wcstol_l.c (____wcstol_l_internal): Likewise.
* wcsmbs/wcstold.c (____wcstold_l_internal): Likewise.
* wcsmbs/wcstold_l.c (____wcstold_l_internal): Likewise.
* wcsmbs/wcstoll_l.c (____wcstoll_l_internal): Likewise.
* wcsmbs/wcstoul_l.c (____wcstoul_l_internal): Likewise.
* wcsmbs/wcstoull_l.c (____wcstoull_l_internal): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark __internal_statvfs[64] with attribute_hidden to allow direct access
to them within libc.so and libc.a without using GOT nor PLT.
[BZ #18822]
* sysdeps/unix/sysv/linux/fstatvfs.c: Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs): Removed.
* sysdeps/unix/sysv/linux/fstatvfs64.c Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs64): Removed.
* sysdeps/unix/sysv/linux/internal_statvfs.c: Include
"internal_statvfs.h" instead of <sys/statvfs.h>.
* sysdeps/unix/sysv/linux/internal_statvfs.h: New file.
* sysdeps/unix/sysv/linux/statvfs.c Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs): Removed.
* sysdeps/unix/sysv/linux/statvfs64.c Include "internal_statvfs.h"
instead of <sys/statvfs.h>.
(__internal_statvfs64): Removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark internal functions with attribute_hidden to allow direct access to
internal functions within libc.so and libc.a without using GOT nor PLT.
Size comparison of libc.so:
On x86-64:
text data bss dec hex
Before: 1728577 20584 17088 1766249 1af369
After : 1728593 20584 17088 1766265 1af379
The only change is __gconv_release_shlib in iconv/gconv_dl.c is inlined
since it is hidden, which increases the code size of gconv_dl.os by 18
bytes.
On i686:
text data bss dec hex
Before: 1869039 11444 11112 1891595 1cdd0b
After : 1868635 11444 11112 1891191 1cdb77
The code size is decreased by avoiding GOT/PLT for hidden functions.
[BZ #18822]
* iconv/gconv_int.h (__gconv_open): Add attribute_hidden.
(__gconv_close): Likewise.
(__gconv): Likewise.
(__gconv_find_transform): Likewise.
(__gconv_lookup_cache): Likewise.
(__gconv_compare_alias_cache): Likewise.
(__gconv_load_cache): Likewise.
(__gconv_get_path): Likewise.
(__gconv_close_transform): Likewise.
(__gconv_release_cache): Likewise.
(__gconv_find_shlib): Likewise.
(__gconv_release_shlib): Likewise.
(__gconv_get_builtin_trans): Likewise.
(__gconv_compare_alias): Likewise.
* include/dlfcn.h (_dlerror_run): Likewise.
* include/stdio.h (__fortify_fail_abort): Likewise.
* include/time.h (__tz_compute): Likewise.
(__strptime_internal): Likewise.
* intl/gettextP.h (_nl_find_domain): Likewise.
(_nl_load_domain): Likewise.
(_nl_find_msg): Likewise.
* intl/plural-exp.h (FREE_EXPRESSION): Likewise.
(EXTRACT_PLURAL_EXPRESSION): Likewise.
* locale/coll-lookup.h (__collidx_table_lookup): Likewise.
* resolv/gai_misc.h (__gai_enqueue_request): Likewise.
(__gai_find_request): Likewise.
(__gai_remove_request): Likewise.
(__gai_notify): Likewise.
(__gai_notify_only): Likewise.
* sysdeps/generic/aio_misc.h (__aio_sigqueue): Likewise.
* sysdeps/generic/ldsodefs.h (_dl_fini): Likewise.
(_dl_non_dynamic_init): Likewise.
(_dl_aux_init): Likewise.
* sysdeps/i386/machine-gmon.h (mcount_internal): Likewise.
* sysdeps/unix/sysv/linux/i386/olddirent.h (__old_getdents64):
Likewise.
* wcsmbs/wcsmbsload.h (__wcsmbs_load_conv): Likewise.
(__wcsmbs_clone_conv): Likewise.
(__wcsmbs_named_conv): Likewise.
|
|
|
|
|
|
|
|
|
| |
__setcontext on hppa.
* sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Save return
pointer in frame.
* sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): Likewise.
Correct offset used to restore PIC register.
|
|
|
|
|
|
| |
[BZ libc/22165]
* sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Use PIC
code to load address of __getcontext_ret when generating PIC code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuing the move of libm aliases to common macros that can create
_FloatN / _FloatNx aliases in future, this patch converts some dbl-64
functions to using libm_alias_double, thereby eliminating the need for
some ldbl-opt wrappers.
This patch deliberately limits what functions are converted so that it
can be verified by comparison of stipped binaries. Specifically, atan
and tan are excluded because they first need converting to being weak
aliases; fma is omitted as it has additional complications with
versions in other directories (removing the ldbl-opt version can
e.g. cause the ldbl-128 version to be used instead of dbl-64); and
functions that have both dbl-64/wordsize-64 and ldbl-opt versions are
excluded because ldbl-opt currently always wraps dbl-64 function
versions, so changing those will result in platforms using both
ldbl-opt and dbl-64/wordsize-64 (i.e. alpha) starting to use the
dbl-64/wordsize-64 versions of those functions (which is good, as an
optimization, but still best separated from the present patch to get
better validation).
Tested for x86_64, and tested with build-many-glibcs.py that installed
stripped shared libraries are unchanged by the patch.
* sysdeps/ieee754/dbl-64/s_asinh.c: Include <libm-alias-double.h>.
(asinh): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_cbrt.c: Include <libm-alias-double.h>.
(cbrt): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_copysign.c: Include
<libm-alias-double.h>.
(copysign): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_erf.c: Include <libm-alias-double.h>.
(erf): Define using libm_alias_double.
(erfc): Likewise.
* sysdeps/ieee754/dbl-64/s_expm1.c: Include <libm-alias-double.h>.
(expm1): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_fabs.c: Include <libm-alias-double.h>.
(fabs): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_fromfp.c (fromfp): Define using
libm_alias_double.
* sysdeps/ieee754/dbl-64/s_fromfp_main.c: Include
<libm-alias-double.h>.
* sysdeps/ieee754/dbl-64/s_fromfpx.c (fromfpx): Define using
libm_alias_double.
* sysdeps/ieee754/dbl-64/s_getpayload.c: Include
<libm-alias-double.h>.
(getpayload): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_llrint.c: Include
<libm-alias-double.h>.
(llrint): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_lrint.c: Include <libm-alias-double.h>.
(lrint): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_nextup.c: Include
<libm-alias-double.h>.
(nextup): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_roundeven.c: Include
<libm-alias-double.h>.
(roundeven): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_setpayload.c (setpayload): Define using
libm_alias_double.
* sysdeps/ieee754/dbl-64/s_setpayload_main.c: Include
<libm-alias-double.h>.
* sysdeps/ieee754/dbl-64/s_setpayloadsig.c (setpayloadsig): Define
using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_sin.c: Include <libm-alias-double.h>.
(cos): Define using libm_alias_double.
(sin): Likewise.
* sysdeps/ieee754/dbl-64/s_sincos.c: Include
<libm-alias-double.h>.
(sincos): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_tanh.c: Include <libm-alias-double.h>.
(tanh): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_totalorder.c: Include
<libm-alias-double.h>.
(totalorder): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_totalordermag.c: Include
<libm-alias-double.h>.
(totalordermag): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/s_ufromfp.c (ufromfp): Define using
libm_alias_double.
* sysdeps/ieee754/dbl-64/s_ufromfpx.c (ufromfpx): Define using
libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_getpayload.c: Include
<libm-alias-double.h>.
(getpayload): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_roundeven.c: Include
<libm-alias-double.h>.
(roundeven): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_setpayload_main.c: Include
<libm-alias-double.h>.
* sysdeps/ieee754/dbl-64/wordsize-64/s_totalorder.c: Include
<libm-alias-double.h>.
(totalorder): Define using libm_alias_double.
* sysdeps/ieee754/dbl-64/wordsize-64/s_totalordermag.c: Include
<libm-alias-double.h>.
(totalordermag): Define using libm_alias_double.
* sysdeps/ieee754/ldbl-opt/s_copysign.c (copysignl): Only define
libc compat symbol here.
* sysdeps/ieee754/ldbl-opt/s_asinh.c: Remove file.
* sysdeps/ieee754/ldbl-opt/s_cbrt.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_erf.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_expm1.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_fabs.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_llrint.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_lrint.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_sin.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_sincos.c: Likewise.
* sysdeps/ieee754/ldbl-opt/s_tanh.c: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
When --enable-static-pie is used to configure glibc, we need to use
_dl_relocate_static_pie to compute load address in static PIE.
* sysdeps/arm/dl-machine.h (elf_machine_load_address): Use
_dl_relocate_static_pie instead of _dl_start to compute load
address in static PIE. Return 0 if _DYNAMIC is undefined for
static executable.
|
|
|
|
|
|
|
|
|
| |
mips uses a local label to compute load address, which works with static
PIE. We just need to return 0 if _DYNAMIC is undefined for static
executable.
* sysdeps/mips/dl-machine.h (elf_machine_dynamic): Return 0 if
_DYNAMIC is undefined for static executable.
|
|
|
|
|
|
|
| |
Since start.o may be compiled as PIC, we should check PIC instead of
SHARED.
* sysdeps/arm/start.S (_start): Check PIC instead of SHARED.
|
|
|
|
| |
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few math functions still use __fabs(f/l) rather than fabs, which
means they won't be inlined. Rename them so they are inlined.
Also add -fno-builtin-fabsl to nofpu powerpc makefile to work around
BZ #29253.
* sysdeps/ieee754/dbl-64/e_lgamma_r.c
(__ieee754_lgamma_r): Use fabs rather than __fabs.
* sysdeps/ieee754/dbl-64/e_log10.c (__ieee754_log10): Likewise.
* sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Likewise.
* sysdeps/ieee754/flt-32/e_lgammaf_r.c
(__ieee754_lgammaf_r): Use fabsf rather than __fabsf.
* sysdeps/ieee754/flt-32/e_log10f.c (__ieee754_log10f): Likewise.
* sysdeps/ieee754/flt-32/e_log2f.c (__ieee754_log2f): Likewise.
* sysdeps/ieee754/ldbl-128/e_lgammal_r.c
(__ieee754_lgammal_r): Use fabsl rather than __fabsl.
* sysdeps/ieee754/ldbl-128/e_log10l.c (__ieee754_log10l): Likewise.
* sysdeps/ieee754/ldbl-128/e_log2l.c (__ieee754_log2l): Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_lgammal_r.c
(__ieee754_lgammal_r): Use fabsl rather than __fabsl.
* sysdeps/ieee754/ldbl-128ibm/e_log10l.c (__ieee754_log10l): Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_log2l.c (__ieee754_log2l): Likewise.
* sysdeps/powerpc/nofpu/Makefile: Add -fno-builtin-fabsl for BZ #29253.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
without wrapper on aarch64:
powf reciprocal-throughput: 4.2x faster
powf latency: 2.6x faster
old worst-case error: 1.11 ulp
new worst-case error: 0.82 ulp
aarch64 .text size: -780 bytes
aarch64 .rodata size: +144 bytes
powf(x,y) is implemented as exp2(y*log2(x)) with the same algorithms
that are used in exp2f and log2f, except that the log2f polynomial is
larger for extra precision and its output (and exp2f input) may be
scaled by a power of 2 (POWF_SCALE) to simplify the argument reduction
step of exp2 (possible when efficient round and convert toint operation
is available).
The special case handling tries to minimize the checks in the hot path.
When the input of exp2_inline is checked, int arithmetics is used as
that was faster on the tested aarch64 cores.
* math/Makefile (type-float-routines): Add e_powf_log2_data.
* sysdeps/ieee754/flt-32/e_powf.c: New implementation.
* sysdeps/ieee754/flt-32/e_powf_log2_data.c: New file.
* sysdeps/ieee754/flt-32/math_config.h (__powf_log2_data): Define.
(issignalingf_inline): Likewise.
(POWF_LOG2_TABLE_BITS): Likewise.
(POWF_LOG2_POLY_ORDER): Likewise.
(POWF_SCALE_BITS): Likewise.
(POWF_SCALE): Likewise.
* sysdeps/i386/fpu/e_powf_log2_data.c: New file.
* sysdeps/ia64/fpu/e_powf_log2_data.c: New file.
* sysdeps/m68k/m680x0/fpu/e_powf_log2_data.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to the new logf: double precision arithmetics and a small
lookup table is used. The argument reduction step is the same as in
the new logf.
without wrapper on aarch64:
log2f reciprocal-throughput: 2.3x faster
log2f latency: 2.1x faster
old worst case error: 1.72 ulp
new worst case error: 0.75 ulp
aarch64 .text size: -252 bytes
aarch64 .rodata size: +244 bytes
* math/Makefile (type-float-routines): Add e_log2f_data.
* sysdeps/ieee754/flt-32/e_log2f.c: New implementation.
* sysdeps/ieee754/flt-32/e_log2f_data.c: New file.
* sysdeps/ieee754/flt-32/math_config.h (__log2f_data): Define.
(LOG2F_TABLE_BITS, LOG2F_POLY_ORDER): Define.
* sysdeps/i386/fpu/e_log2f_data.c: New file.
* sysdeps/ia64/fpu/e_log2f_data.c: New file.
* sysdeps/m68k/m680x0/fpu/e_log2f_data.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
without wrapper on aarch64:
logf reciprocal-throughput: 2.2x faster
logf latency: 1.9x faster
old worst case error: 0.89 ulp
new worst case error: 0.82 ulp
aarch64 .text size: -356 bytes
aarch64 .rodata size: +240 bytes
Uses double precision arithmetics and a lookup table to allow smaller
polynomial and avoid the use of division.
Data is in a separate translation unit with fixed layout to prevent the
compiler generating suboptimal literal access.
Errors are handled inline according to POSIX rules, but this patch
keeps the wrapper with SVID compatible error handling.
Needs libm-test-ulps adjustment for clogf in non-nearest rounding mode.
* math/Makefile (type-float-routines): Add e_logf_data.
* sysdeps/ieee754/flt-32/e_logf.c: New implementation.
* sysdeps/ieee754/flt-32/e_logf_data.c: New file.
* sysdeps/ieee754/flt-32/math_config.h (__logf_data): Define.
(LOGF_TABLE_BITS, LOGF_POLY_ORDER): Define.
* sysdeps/i386/fpu/e_logf_data.c: New file.
* sysdeps/ia64/fpu/e_logf_data.c: New file.
* sysdeps/m68k/m680x0/fpu/e_logf_data.c: New file.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When --enable-static-pie is used to build static PIE, _DYNAMIC is used
to compute the load address of static PIE. But _DYNAMIC is undefined
when creating static executable. This patch makes _DYNAMIC weak in PIE
libc.a so that it can be undefined.
* sysdeps/i386/dl-machine.h (elf_machine_load_address): Allow
undefined _DYNAMIC in PIE libc.a.
* sysdeps/x86_64/dl-machine.h (elf_machine_load_address):
Likewse.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove __signbit inlines from mathinline.h. Math.h already uses
the builtin when supported, so additional inlines are only used
on pre 4.0 GCCs. Similarly remove ancient copysign and fabs
inlines.
* sysdeps/alpha/fpu/bits/mathinline.h: Delete file.
* sysdeps/ia64/fpu/bits/mathinline.h: Delete file.
* sysdeps/m68k/coldfire/fpu/bits/mathinline.h: Delete file.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h: (__signbitf): Remove.
(__signbit): Remove.
(__signbitl): Remove.
* sysdeps/powerpc/bits/mathinline.h (__signbitf): Remove.
(__signbit): Remove.
(__signbitl): Remove.
* sysdeps/s390/fpu/bits/mathinline.h: (__signbitf): Remove.
(__signbit): Remove.
(__signbitl): Remove
* sysdeps/sparc/fpu/bits/mathinline.h (__signbitf): Remove.
(__signbit): Remove.
(__signbitl): Remove.
* sysdeps/tile/bits/mathinline.h: Delete file.
* sysdeps/x86/fpu/bits/mathinline.h (__signbitf): Remove.
(__signbit): Remove.
(__signbitl): Remove.
|