about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* Use libm_alias_ldouble for ldbl-96 functions.Joseph Myers2017-10-0532-30/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes ldbl-96 functions use libm_alias_ldouble to define function aliases. Tested for x86_64, and tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * sysdeps/ieee754/ldbl-96/s_asinhl.c: Include <libm-alias-ldouble.h>. (asinhl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_cbrtl.c: Include <libm-alias-ldouble.h>. (cbrtl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_copysignl.c: Include <libm-alias-ldouble.h>. (copysignl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_cosl.c: Include <libm-alias-ldouble.h>. (cosl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_erfl.c: Include <libm-alias-ldouble.h>. (erfl): Define using libm_alias_ldouble. (erfcl): Likewise. * sysdeps/ieee754/ldbl-96/s_fmal.c: Include <libm-alias-ldouble.h>. (fmal): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_frexpl.c: Include <libm-alias-ldouble.h>. (frexpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_fromfpl.c (fromfpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_fromfpl_main.c: Include <libm-alias-ldouble.h>. * sysdeps/ieee754/ldbl-96/s_fromfpxl.c (fromfpxl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_getpayloadl.c: Include <libm-alias-ldouble.h>. (getpayloadl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_llrintl.c: Include <libm-alias-ldouble.h>. (llrintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_llroundl.c: Include <libm-alias-ldouble.h>. (llroundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_lrintl.c: Include <libm-alias-ldouble.h>. (lrintl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_lroundl.c: Include <libm-alias-ldouble.h>. (lroundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_modfl.c: Include <libm-alias-ldouble.h>. (modfl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_nextupl.c: Include <libm-alias-ldouble.h>. (nextupl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_remquol.c: Include <libm-alias-ldouble.h>. (remquol): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_roundevenl.c: Include <libm-alias-ldouble.h>. (roundevenl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_roundl.c: Include <libm-alias-ldouble.h>. (roundl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_setpayloadl.c (setpayloadl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_setpayloadl_main.c: Include <libm-alias-ldouble.h>. * sysdeps/ieee754/ldbl-96/s_setpayloadsigl.c: Include <libm-alias-ldouble.h>. (setpayloadsigl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_sincosl.c: Include <libm-alias-ldouble.h>. (sincosl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_sinl.c: Include <libm-alias-ldouble.h>. (sinl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_tanhl.c: Include <libm-alias-ldouble.h>. (tanhl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_tanl.c: Include <libm-alias-ldouble.h>. (tanl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_totalorderl.c: Include <libm-alias-ldouble.h>. (totalorderl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_totalordermagl.c: Include <libm-alias-ldouble.h>. (totalordermagl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_ufromfpl.c (ufromfpl): Define using libm_alias_ldouble. * sysdeps/ieee754/ldbl-96/s_ufromfpxl.c (ufromfpxl): Define using libm_alias_ldouble.
* aarch64: Optimized implementation of memmove for Qualcomm FalkorSiddhesh Poyarekar2017-10-055-2/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an optimized memmove implementation for the Qualcomm Falkor processor core. Due to the way the falkor memcpy needs to be written, code cannot be easily shared between memmove and memcpy like in case of other aarch64 memcpy implementations due to which this routine is separate. The underlying principle is the same as that of memcpy where it tries to use registers with the same lower 4 bits for fetching the same stream, thus optimizing hardware prefetcher performance. The memcpy copy loop copies 64 bytes at a time using the same register pair since that's the way to train the hardware prefetcher on the falkor core. memmove cannot quite do that since it needs to avoid overlaps, so it does the next best thing, i.e. has a 32 byte loop with a 32 byte end (prefetch a loop ahead to account for overlapping locations) with register pairs that alias so that they hit the same prefetcher. Due to this difference in loop size, they have to currently be separate implementations but efforts are on to try and get memmove to fall back into memcpy whenever it can without simply duplicating all of the code. Performance: The routine fares around 20-25% better than the generic memmove for most medium to large sizes (i.e. > 128 bytes) for the new walking memmove benchmark (memmove-walk) with an unexplained regression between 1K and 2K. The minor regression is something worth looking into for us, but the remaining gains are significant enough that we would like this included upstream as we looking into the cause for the regression. Here is a snippet of the numbers as generated from the microbenchmark by the compare_strings script. Comparisons are against __memmove_generic: Function: memmove Variant: walk __memmove_thunderx __memmove_falkor __memmove_generic ======================================================================================================================== <snip> length=16384: 12508800.00 ( 6.09%) 11486800.00 ( 13.76%) 13319600.00 length=16400: 13614200.00 ( -0.67%) 11585000.00 ( 14.33%) 13523600.00 length=16385: 13448400.00 ( 0.10%) 11732700.00 ( 12.84%) 13461200.00 length=16399: 13594100.00 ( -0.22%) 11859600.00 ( 12.57%) 13564400.00 length=16386: 13211600.00 ( 1.13%) 11503800.00 ( 13.91%) 13362400.00 length=16398: 13218600.00 ( 2.12%) 11573200.00 ( 14.30%) 13504700.00 length=16387: 13510900.00 ( -0.37%) 11744200.00 ( 12.76%) 13461300.00 length=16397: 13603700.00 ( -0.15%) 11878200.00 ( 12.55%) 13583200.00 length=16388: 13461700.00 ( -0.13%) 11558000.00 ( 14.03%) 13444100.00 length=16396: 13517500.00 ( -0.03%) 11561300.00 ( 14.45%) 13513900.00 length=16389: 13534100.00 ( 0.17%) 11756800.00 ( 13.28%) 13556900.00 length=16395: 13585600.00 ( 0.11%) 11791800.00 ( 13.30%) 13601200.00 length=16390: 13480100.00 ( -0.13%) 11685500.00 ( 13.20%) 13462100.00 length=16394: 13529900.00 ( -0.23%) 11549800.00 ( 14.43%) 13498200.00 length=16391: 13595400.00 ( -0.26%) 11768200.00 ( 13.22%) 13560600.00 length=16393: 13567000.00 ( 0.20%) 11779700.00 ( 13.35%) 13594700.00 length=32768: 71308800.00 ( -6.53%) 50220800.00 ( 24.98%) 66939200.00 length=32784: 72100800.00 (-11.55%) 50114100.00 ( 22.47%) 64636300.00 length=32769: 71767000.00 ( -7.10%) 51238400.00 ( 23.54%) 67010000.00 length=32783: 70113700.00 (-40.95%) 51129000.00 ( -2.78%) 49744400.00 length=32770: 71367600.00 ( -6.52%) 50244700.00 ( 25.01%) 67000900.00 length=32782: 64366700.00 ( 4.71%) 50101400.00 ( 25.83%) 67545600.00 length=32771: 71440100.00 ( -6.51%) 51263900.00 ( 23.57%) 67074900.00 length=32781: 66993000.00 ( 0.34%) 51108300.00 ( 23.97%) 67220300.00 length=32772: 71443900.00 (-60.50%) 50062100.00 (-12.47%) 44512600.00 length=32780: 71759100.00 ( -6.58%) 50263200.00 ( 25.35%) 67328600.00 length=32773: 71714900.00 (-33.21%) 51076600.00 ( 5.12%) 53835400.00 length=32779: 71756900.00 ( -6.56%) 51290800.00 ( 23.83%) 67337800.00 length=32774: 59689300.00 (-34.55%) 50068400.00 (-12.86%) 44363300.00 length=32778: 71847500.00 (-18.20%) 50084100.00 ( 17.61%) 60786500.00 length=32775: 71599300.00 ( -6.54%) 51278200.00 ( 23.70%) 67204800.00 length=32777: 71862900.00 (-60.85%) 51094000.00 (-14.36%) 44677900.00 length=65536: 282848000.00 ( -6.60%) 199187000.00 ( 24.93%) 265325000.00 length=65552: 243285000.00 (-41.61%) 198512000.00 (-15.54%) 171805000.00 length=65537: 255415000.00 (-23.47%) 202499000.00 ( 2.11%) 206858000.00 length=65551: 280122000.00 (-62.95%) 203349000.00 (-18.29%) 171911000.00 length=65538: 283676000.00 (-14.46%) 198368000.00 ( 19.96%) 247848000.00 length=65550: 275566000.00 (-51.76%) 198494000.00 ( -9.31%) 181581000.00 length=65539: 283699000.00 ( -6.58%) 203453000.00 ( 23.57%) 266195000.00 length=65549: 286572000.00 ( -6.65%) 202607000.00 ( 24.60%) 268712000.00 length=65540: 283710000.00 ( -6.59%) 199161000.00 ( 25.17%) 266160000.00 length=65548: 237573000.00 ( 11.48%) 198462000.00 ( 26.06%) 268395000.00 length=65541: 284150000.00 ( -6.58%) 203273000.00 ( 23.75%) 266600000.00 length=65547: 286250000.00 ( -6.70%) 202594000.00 ( 24.48%) 268263000.00 length=65542: 284167000.00 ( -6.60%) 199122000.00 ( 25.31%) 266584000.00 length=65546: 285656000.00 ( -6.59%) 198443000.00 ( 25.95%) 268002000.00 length=65543: 284600000.00 ( -6.58%) 203247000.00 ( 23.89%) 267030000.00 length=65545: 285665000.00 ( -6.40%) 202575000.00 ( 24.55%) 268472000.00 <snip> * sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add memmove_falkor. * sysdeps/aarch64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Likewise. * sysdeps/aarch64/multiarch/memmove.c: Likewise. * sysdeps/aarch64/multiarch/memmove_falkor.S: New file.
* benchtests: Memory walking benchmark for memmoveSiddhesh Poyarekar2017-10-053-1/+147
| | | | | | | | | | | | | | | | This benchmark is an attempt to eliminate cache effects from string benchmarks. The benchmark walks both ways through a large memory area and copies different sizes of memory and alignments one at a time instead of looping around in the same memory area. This is a good metric to have alongside the simple memmove benchmark (which is only really useful for smaller sizes) especially for larger sizes where the likelihood of the call being done only once is pretty high. This benchmark is different from memcpy in that it also tests overlapping copies. * benchtests/bench-memmove-walk.c: New file. * benchtests/Makefile (string-benchset): Add it.
* benchtests: Memory walking benchmark for memsetSiddhesh Poyarekar2017-10-053-1/+142
| | | | | | | | | | | | | This benchmark is an attempt to eliminate cache effects from string benchmarks. The benchmark walks backward through a large memory area and sets different sizes of memory and alignments one at a time instead of looping around in the same memory area. This is a good metric to have alongside the simple memset benchmark (which is only really useful for smaller sizes) especially for larger sizes where the likelihood of the call being done only once is pretty high. * benchtests/bench-memset-walk.c: New file. * benchtests/Makefile (string-benchset): Add it.
* benchtests: Memory walking benchmark for memcpySiddhesh Poyarekar2017-10-053-1/+134
| | | | | | | | | | | | | This benchmark is an attempt to eliminate cache effects from string benchmarks. The benchmark walks both ways through a large memory area and copies different sizes of memory and alignments one at a time instead of looping around in the same memory area. This is a good metric to have alongside the other memcpy benchmarks, especially for larger sizes where the likelihood of the call being done only once is pretty high. * benchtests/bench-memcpy-walk.c: New file. * benchtests/Makefile (string-benchset): Add it.
* nscd: Eliminate compilation time dependency in the build outputFlorian Weimer2017-10-052-6/+32
| | | | Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Remove add-ons mechanism.Joseph Myers2017-10-0520-649/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glibc has an add-ons mechanism to allow additional software to be integrated into the glibc build. Such add-ons may be within the glibc source tree, or outside it at a path passed to the --enable-add-ons configure option. localedata and crypt were once add-ons, distributed in separate release tarballs, but long since stopped using that mechanism. Linuxthreads was always an add-on. Ports spent some time as an add-on with separate release tarballs, then was first moved into the glibc source tree, then had its sysdeps files moved into the main sysdeps hierarchy so the add-ons mechanism was no longer used. NPTL spent some time as an add-on in the main glibc tree before stopping using the add-on mechanism. libidn used to have separate release tarballs but no longer does so, but still uses the add-ons mechanism within the glibc source tree. Various other software has supported building with the add-ons mechanism at times in the past, but I don't think any is still widely used. Add-ons involve significant, little-used complexity in the glibc build system, and make it hard to understand what the space of possible glibc configurations is. This patch removes the add-ons mechanism. libidn is now built via the Subdirs mechanism to cause any configuration using sysdeps/unix/inet to build libidn; HAVE_LIBIDN (which effectively means shared libraries are available) is now defined via sysdeps/unix/inet/configure. Various references to add-ons around the source tree are removed (in the case of maint.texi, the example list of sysdeps directories is still very out of date). Externally maintained ports should now put their files in the normal sysdeps directory structure rather than being arranged as add-ons; they probably need to change e.g. elf.h anyway, rather than actually being able to work just as a drop-in subtree. Hurd libpthread should be arranged similarly to NPTL, so some files might go in a hurd-pthreads (or similar) top-level directory in glibc, while sysdeps files should go in the normal sysdeps directory structure (possibly in hurd or hurd-pthreads subdirectories, just as there are nptl subdirectories in the sysdeps tree). Tested for x86_64, and with build-many-glibcs.py. * configure.ac (--enable-add-ons): Remove option. (machine): Do not mention add-ons in comment. (LIBC_PRECONFIGURE): Likewise. (add_ons): Remove variable and sanity checks and logic to locate add-ons. (add_ons_automatic): Remove variable. (configured_add_ons): Likewise. (add_ons_sfx): Likewise. (add_ons_pfx): Likewise. (add_on_subdirs): Likewise. (sysnames_add_ons): Likewise. Remove loop over add-ons and consideration of add-ons in Implies handling. (sysdeps_add_ons): Likewise. * configure: Regenerated. * libidn/configure.ac: Remove. * libidn/configure: Likewise. * sysdeps/unix/inet/configure.ac: New file. * sysdeps/unix/inet/configure: New generated file. * sysdeps/unix/inet/Subdirs: Add libidn. * Makeconfig (sysdeps-srcdirs): Remove variable. (+sysdep_dirs): Do not include $(sysdeps-srcdirs). ($(common-objpfx)config.status): Do not depend on add-on files. ($(common-objpfx)shlib-versions.v.i): Do not mention add-ons in comment. (all-subdirs): Do not include $(add-on-subdirs). * Makefile (dist-prepare): Do not use $(sysdeps-add-ons). * config.make.in (add-ons): Remove variable. (add-on-subdirs): Likewise. (sysdeps-add-ons): Likewise. * manual/Makefile (add-chapters): Remove. ($(objpfx)texis): Do not depend on $(add-chapters). (nonexamples): Do not handle $(add-chapters). (examples): Do not handle $(add-ons). (chapters.% top-menu.%): Do not pass '$(add-chapters)' to libc-texinfo.sh. * manual/install.texi (Installation): Do not mention add-ons. (--enable-add-ons): Do not document configure option. * INSTALL: Regenerated. * manual/libc-texinfo.sh: Do not handle $2 add-ons argument. * manual/maint.texi (Hierarchy Conventions): Do not mention add-ons. * scripts/build-many-glibcs.py (Glibc.build_glibc): Do not use --enable-add-ons. * scripts/gen-sorted.awk: Do not handle Subdirs files from add-ons. * scripts/test-installation.pl: Do not handle glibc-compat add-on. * sysdeps/nptl/Makeconfig: Do not mention add-ons in comment.
* Always do locking when iterating over list of streams (bug 15142)Andreas Schwab2017-10-052-42/+26
| | | | _IO_list_all should only be traversed while locking list_all_lock.
* abort: Do not flush stdio streams [BZ #15436]Florian Weimer2017-10-053-24/+17
|
* tst-gmon: Build with -fno-omit-frame-pointerFlorian Weimer2017-10-052-1/+5
| | | | | | | | If glibc is built with -fomit-frame-pointer to undo the effect of configuring GCC with --enable-frame-pointer, using -pg by itself results in a build failure: gcc: error: -pg and -fomit-frame-pointer are incompatible
* S390: Regenerate ULPsStefan Liebler2017-10-052-2/+12
| | | | | | | | Updated ulps file. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* support_format_hostent: Add more error information for NETDB_INTERNALFlorian Weimer2017-10-052-4/+15
|
* Don't use hidden visibility in libc.a with PIE on i386H.J. Lu2017-10-045-1/+26
| | | | | | | | | | | | | On i386, when multi-arch is enabled, all external functions must be called via PIC PLT in PIE, which requires setting up EBX register, since they may be IFUNC functions. * config.h.in (NO_HIDDEN_EXTERN_FUNC_IN_PIE): New. * include/libc-symbols.h (__hidden_proto_hiddenattr): Add check for PIC and NO_HIDDEN_EXTERN_FUNC_IN_PIE. * sysdeps/i386/configure.ac (NO_HIDDEN_EXTERN_FUNC_IN_PIE): New AC_DEFINE if multi-arch is enabled. * sysdeps/i386/configure: Regenerated.
* Use $(DEFAULT-LDFLAGS-$(@F)) in +link-static-before-libcH.J. Lu2017-10-043-1/+11
| | | | | | | | | | | | | | Use $(LDFLAGS-$(@F)) with tst-tls1-static-non-pie may not be sufficient when static PIE is built by default. Use $(DEFAULT-LDFLAGS-$(@F)) in +link-static-before-libc to make sure that tst-tls1-static-non-pie is always built as non-PIE static executable and make sure that crt1.o is used with tst-tls1-static-non-pie. * Makeconfig (+link-static-before-libc): Use $(DEFAULT-LDFLAGS-$(@F)). * elf/Makefile (CRT-tst-tls1-static-non-pie): New. (LDFLAGS-tst-tls1-static-non-pie): Renamed to ... (DEFAULT-LDFLAGS-tst-tls1-static-non-pie): This.
* Add a test for main () in a shared objectH.J. Lu2017-10-044-2/+65
| | | | | | | | | | | | | | Verify that crt1.o can be used with main () in a shared object. * elf/Makefile (tests): Add tst-main1. (modules-names): Add tst-main1mod. ($(objpfx)tst-main1): New. (CRT-tst-main1): Likewise. (LDFLAGS-tst-main1): Likewise. (LDLIBS-tst-main1): Likewise. (tst-main1mod.so-no-z-defs): Likewise. * elf/tst-main1.c: New file. * elf/tst-main1mod.c: Likewise.
* test-math-iscanonical.cc: Return errors != 0H.J. Lu2017-10-042-1/+5
| | | | | | | Since not all non-zero error counts are errors, return errors != 0 instead. * math/test-math-iscanonical.cc (do_test): Return errors != 0.
* Use libm_alias_double for dbl-64 fma.Joseph Myers2017-10-045-15/+14
| | | | | | | | | | | | | | | | | | | This patch makes dbl-64 fma use libm_alias_double. The ldbl-opt version is removed. The sparc32 version no longer needs to handle compat symbols, while alpha needs a new wrapper to avoid getting the ldbl-128 version (where ldbl-opt is earlier in the list of sysdeps directories, so previously fma came from there). 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_fma.c: Include <libm-alias-double.h>. (fma): Define using libm_alias_double. * sysdeps/ieee754/ldbl-opt/s_fma.c: Remove file. * sysdeps/sparc/sparc32/fpu/s_fma.c: Do not include <math_ldbl_opt.h>. (fmal): Do not define as compat symbol here. * sysdeps/alpha/fpu/s_fma.c: New file.
* aarch64: don't use MIN in dl-machine.hSzabolcs Nagy2017-10-042-1/+6
| | | | | | | MIN is used, but param.h may not be included, so expand its single use inline. * sysdeps/aarch64/dl-machine.h (elf_machine_rela): Expand MIN.
* Restore sparc32 copysignl, fabsl, fmal compat symbols (bug 22229).Joseph Myers2017-10-049-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32-bit SPARC libm should have compat symbols for copysignl (GLIBC_2.0), fabsl (GLIBC_2.0), fmal (GLIBC_2.1), pointing to the double functions; they were present in glibc 2.8, for example, but are now missing, probably when optimized SPARC function implementations were added without appropriate compat symbol handling. The same applies to copysignl in libc. This patch restores those compat symbols. Tested with build-many-glibcs.py for sparcv9-linux-gnu. [BZ #22229] * sysdeps/sparc/sparc32/fpu/s_copysign.S: Include <math_ldbl_opt.h> (copysignl): Define as compat symbol at version GLIBC_2_0 for libm and libc. * sysdeps/sparc/sparc32/fpu/s_fabs.S: Include <math_ldbl_opt.h>. (fabsl): Define as compat symbol at version GLIBC_2_0 for libm. * sysdeps/sparc/sparc32/fpu/s_fma.c: Include <math_ldbl_opt.h>. (fmal): Define as compat symbol at version GLIBC_2_1 for libm. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: Include <math_ldbl_opt.h> (copysignl): Define as compat symbol at version GLIBC_2_0 for libm and libc. (compat_symbol): Undefine and redefine. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Include <math_ldbl_opt.h> (fabsl): Define as compat symbol at version GLIBC_2_0 for libm. (compat_symbol): Undefine and redefine. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c [HAVE_AS_VIS3_SUPPORT]: Include <math_ldbl_opt.h>. [HAVE_AS_VIS3_SUPPORT] (fmal): Define as compat symbol at version GLIBC_2_1 for libm. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Add GLIBC_2.0 copysignl symbol. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Add GLIBC_2.0 copysignl and fabsl and GLIBC_2.1 fmal symbols.
* Remove alpha nearbyint wrapper.Joseph Myers2017-10-042-25/+4
| | | | | | | | | | | | | | Given my recent changes, sysdeps/alpha/fpu/s_nearbyint.c is no longer needed: it just includes the dbl-64/wordsize-64 version, which is the one that would be used anyway, and defines a compat symbol, duplicating the same compat symbol defined by the dbl-64/wordsize-64 version through use of libm_alias_double. Thus, this patch removes the redundant wrapper. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged for alpha. * sysdeps/alpha/fpu/s_nearbyint.c: Remove file.
* crypt: Adjust check-local-headers.sh for nspr4 include directory [BZ #17956]Florian Weimer2017-10-042-1/+6
|
* crypt: Use NSPR header files in addition to NSS header files [BZ #17956]Guido Trentalancia2017-10-045-6/+27
| | | | | | | | | When configuring and building GNU libc using the Mozilla NSS library for cryptography (--enable-nss-crypt option), also include the NSPR header files along with the Mozilla NSS library header files. Finally, when running the check-local-headers test, ignore the Mozilla NSPR library header files (used by the Mozilla NSS library).
* Move nss_compat from nis to nss subdir and install it unconditionallyAndreas Schwab2017-10-0411-46/+142
| | | | | | This has been tested that local lookup still works with and without an installed libnss_nis, and that NIS lookup works when libnss_nis is available.
* [BZ #22244] Fix yn(n,0) without SVID wrapperSzabolcs Nagy2017-10-043-8/+14
| | | | | | | | | | Without SVID compat wrapper yn(n,0) and ynf(n,0) does not raise the divide-by-zero excpetion and it may return inf with the wrong sign for n < 0. [BZ #22244] * sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_yn): Fix x == 0 case. * sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_ynf): Likewise.
* [BZ #22243] fix log2(0) and log(10) in downward roundingSzabolcs Nagy2017-10-043-2/+8
| | | | | | | | | On 64bit targets if the SVID compat wrapper is suppressed (e.g. static linking) then log2(0) and log10(0) returned inf instead of -inf. [BZ #22243] * sysdeps/ieee754/dbl-64/wordsize-64/e_log10.c (__ieee754_log10): Use fabs. * sysdeps/ieee754/dbl-64/wordsize-64/e_log2.c (__ieee754_log2): Likewise.
* i386: Use "movl main@GOT(%ebx), %eax" in start.SH.J. Lu2017-10-032-2/+10
| | | | | | | | | Don't use "leal main@GOTOFF(%ebx), %eax" since main may be in a shared object. Linker will convert "movl main@GOT(%ebx), %eax" to "leal main@GOTOFF(%ebx), %eax" if main is defined locally. * sysdeps/i386/start.S: Replace "leal main@GOT(%ebx), %eax" with "movl main@GOTOFF(%ebx), %eax".
* Revert x86: Allow undefined _DYNAMIC in static executableH.J. Lu2017-10-033-18/+11
| | | | | | | | | | | | This code is used in non-PIE static executable and static PIE. It checks if _DYNAMIC is undefined before using it to compute load address. But not all targets can convert access _DYNAMIC via GOT, which needs dynamic relocation, to PC-relative at link-time. * sysdeps/i386/dl-machine.h (elf_machine_load_address): Don't allow undefined _DYNAMIC in PIE libc.a. * sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Likewse.
* mips: Don't check _DYNAMIC in elf_machine_load_addressH.J. Lu2017-10-032-5/+5
| | | | | | | | | Since mips can't convert access _DYNAMIC via GOT, which needs dynamic relocation, to PC-relative at link-time, don't check _DYNAMIC in elf_machine_load_address. * sysdeps/mips/dl-machine.h (elf_machine_load_address): Don't check _DYNAMIC.
* arm: Don't check _DYNAMIC in elf_machine_load_addressH.J. Lu2017-10-032-3/+5
| | | | | | | | | Since arm can't convert access _DYNAMIC via GOT, which needs dynamic relocation, to PC-relative at link-time, don't check _DYNAMIC in elf_machine_load_address. * sysdeps/arm/dl-machine.h (elf_machine_load_address): Don't check _DYNAMIC.
* test-math-iscanonical.cc: Replace bool with intH.J. Lu2017-10-032-1/+5
| | | | | | | | | | | Fix GCC 7 compilation error: test-math-iscanonical.cc: In function ‘void check_type()’: test-math-iscanonical.cc:33:11: error: use of an operand of type ‘bool’ in ‘operator++’ is deprecated [-Werror=deprecated] errors++; ^~ * math/test-math-iscanonical.cc (error): Replace bool with int.
* Use libm_alias_double for dbl-64 modf.Joseph Myers2017-10-036-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use libm_alias_double for dbl-64 logb.Joseph Myers2017-10-036-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* tile: Check SHARED instead PIC for SYSCALL_ERROR_NAMEH.J. Lu2017-10-032-1/+6
| | | | | | | | 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.
* Use libm_alias_float for dbl-64 fmaf.Joseph Myers2017-10-032-1/+5
| | | | | | | | | | | 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.
* Use libm_alias_double for dbl-64 frexp.Joseph Myers2017-10-034-15/+15
| | | | | | | | | | | | | | | | | | 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.
* Add C++ versions of iscanonical for ldbl-96 and ldbl-128ibm (bug 22235)Gabriel F. T. Gomes2017-10-037-5/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use libm_alias_double for more dbl-64 functions.Joseph Myers2017-10-0328-140/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix drem symbol for static linking and new targetsSzabolcs Nagy2017-10-034-0/+24
| | | | | | | | | | | The compat remainder code is no longer built for !LIBM_SVID_COMPAT targets, but the legacy drem, dremf and dreml symbols should be still defined since removing them may break existing code, so keep them as aliases in the non-compat remainder code. * math/w_remainder.c: New file. * math/w_remainderf.c: New file. * math/w_remainderl.c: New file.
* ld.so: Replace (&bootstrap_map) with BOOTSTRAP_MAPH.J. Lu2017-10-035-4/+16
| | | | | | | | | | | | | | | (&_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.
* Introduce NO_RTLD_HIDDEN, make hurd use it instead of NO_HIDDENSamuel Thibault2017-10-0315-14/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use libm_alias_double for dbl-64 atan, tan.Joseph Myers2017-10-025-20/+11
| | | | | | | | | | | | | | | | | | | 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.
* Make dbl-64 atan and tan into weak aliases.Joseph Myers2017-10-0211-16/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix gamma symbol for static linking and new targetsSzabolcs Nagy2017-10-024-0/+28
| | | | | | | | | | The lgamma compat code is no longer built for !LIBM_SVID_COMPAT targets, but the legacy gamma, gammaf and gammal symbols should be still defined, so make them aliases to the non-compat lgamma code. * math/w_lgamma.c: New file. * math/w_lgammaf.c: New file. * math/w_lgammal.c: New file.
* Do not wrap logf, log2f and powfSzabolcs Nagy2017-10-0213-6/+45
| | | | | | | | | | | | | | | | | | 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.
* Do not wrap expf and exp2fSzabolcs Nagy2017-10-0214-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* New symbol version for logf, log2f and powf without SVID compatSzabolcs Nagy2017-10-0237-14/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* powerpc: Optimize memrchr for power8Rajalakshmi Srinivasaraghavan2017-10-026-3/+380
| | | | | | | 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 [BZ #18822]H.J. Lu2017-10-013-0/+13
| | | | | | | | | | | | 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 [BZ #18822]H.J. Lu2017-10-012-0/+11
| | | | | | | | | | 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 [BZ #18822]H.J. Lu2017-10-013-0/+9
| | | | | | | | | | 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.