aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-17Add fenv test support for targets which don't have FP traps.Wilco4-10/+36
2014-04-17[AArch64] Define HAVE_RM_CTX and related hooks.Ian Bolton2-0/+67
2014-04-17[AArch64] Provide initial implementation of math_private.h.Ian Bolton2-0/+219
2014-04-16alpha: Remove alpha-linux pthread_once.cRichard Henderson2-95/+2
2014-04-16alpha: Enable unwind tables for backtrace.cRichard Henderson2-0/+8
2014-04-16alpha: Fix __pointer_chk_guard definition for the testsuiteRichard Henderson2-1/+4
2014-04-16alpha: Regenerate sysdeps/alpha/libm-test-ulpsRichard Henderson2-4/+1026
2014-04-16[AArch64] Regenerate libm-test-ulps.Marcus Shawcroft2-87/+1019
2014-04-16Save/restore bound registers for _dl_runtime_profileIgor Zamyatin5-0/+77
This patch saves and restores bound registers in x86-64 PLT for ld.so profile and LD_AUDIT: * sysdeps/x86_64/bits/link.h (La_x86_64_regs): Add lr_bnd. (La_x86_64_retval): Add lrv_bnd0 and lrv_bnd1. * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Save Intel MPX bound registers before _dl_profile_fixup. * sysdeps/x86_64/dl-trampoline.h: Restore Intel MPX bound registers after _dl_profile_fixup. Save and restore bound registers bnd0/bnd1 when calling _dl_call_pltexit. * sysdeps/x86_64/link-defines.sym (BND_SIZE): New. (LR_BND_OFFSET): Likewise. (LRV_BND0_OFFSET): Likewise. (LRV_BND1_OFFSET): Likewise.
2014-04-16hurd: Add i386 fields to TLS structureSamuel Thibault2-0/+13
* sysdeps/mach/hurd/i386/tls.h (tcbhead_t): Add multiple_threads, sysinfo, stack_guard, pointer_guard, gscope_flag, private_futex, __private_tm, __private_ss fields.
2014-04-16hurd: Move dtv, dtv_t, tcbhead_t declaration to per-arch file.Samuel Thibault3-21/+30
2014-04-16hurd: Do not allow unmapping address 0Samuel Thibault2-0/+11
* sysdeps/mach/munmap.c (__munmap): Return EINVAL if `addr' is 0.
2014-04-16S/390: Regenerate ULPsStefan Liebler2-0/+1020
2014-04-16[BZ #14770] S/390: Require Binutils >= 2.24 for target S/390.Stefan Liebler4-6/+89
2014-04-16[BZ #16824] Fix failing y1 due to too large ulps in downward/upward rounding ↵Stefan Liebler3-1/+8
mode.
2014-04-16Update fixed bug listAlan Modra2-4/+5
2014-04-16Correct IBM long double frexpl.Alan Modra3-44/+118
Besides fixing the bugzilla, this also fixes corner-cases where the high and low double differ greatly in magnitude, and handles a denormal input without resorting to a fp rescale. [BZ #16740] [BZ #16619] * sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Rewrite. * math/libm-test.inc (frexp_test_data): Add tests.
2014-04-15benchtests: Link against objects in build directorySiddhesh Poyarekar2-23/+16
Using -lm and -lpthread results in the shared objects in the system being used to link against. This happened to work for libm because there haven't been any changes to the libm ABI recently that could break the existing benchmarks. This doesn't always work for the pthread benchmarks. The correct way to build against libraries in the build directory is to have the binaries explicitly depend on them so that $(+link) can pick them up.
2014-04-14Support _r_debug for static binaries.Carlos O'Donell3-1/+10
We initialize _r_debug for static binaries to allows debug agents to treat static binaries a little more like dyanmic ones. This simplifies the work a debug agent has to do to access TLS in a static binary via libthread_db. Tested on x86_64. See: https://sourceware.org/ml/libc-alpha/2014-04/msg00183.html [BZ #16831] * csu/libc-start.c (LIBC_START_MAIN) [!SHARED]: Call _dl_debug_initialize.
2014-04-14nscd: Make SELinux checks dynamic.Carlos O'Donell4-83/+80
The SELinux team has indicated to me that glibc's SELinux checks in nscd are not being carried out as they would expect the API to be used today. They would like to move away from static header defines for class and permissions and instead use dynamic checks at runtime that provide an answer which is dependent on the runtime status of SELinux i.e. more dynamic. The following patch is a minimal change that moves us forward in this direction. It does the following: * Stop checking for SELinux headers that define NSCD__SHMEMHOST. Check only for the presence or absence of the library. * Don't encode the specific SELinux permission constants into a table at build time, and instead use the symbolic name for the permission as expected. * Lookup the "What do we do if we don't know this permission?" policy and use that if we find SELinux's policy is older than the glibc policy e.g. we make a request for a permission that SELinux doesn't know about. * Lastly, translate the class and permission and then make the permission check. This is done every time we lookup a permission, and this is the expected way to use the API. SELinux will optimize this for us, and we expect the network latencies to hide these extra library calls. Tested on x86, x86-64, and via Fedora Rawhide since November 2013. See: https://sourceware.org/ml/libc-alpha/2014-04/msg00179.html
2014-04-13Regenerate sparc ULPs.David S. Miller2-4/+1026
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2014-04-12Fix qsort argument order in collation exampleAllan McRae3-3/+10
2014-04-11Fix typo on ChangeLog.Paul Pluzhnikov1-1/+1
2014-04-11math: make test-fenv-preserve.c a no-op if FE_ALL_EXCEPT == 0.Chris Metcalf2-0/+10
This fixes a testsuite failure for tile (and possibly microblaze).
2014-04-112014-04-11 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2-1/+9
* elf/Makefile (tests): make tst-dlopen-aout conditional on enable-hardcoded-path-in-tests
2014-04-11benchtests: Improve readability of JSON outputWill Newton6-23/+268
Add a small library to print JSON values and use it to improve the readability of the benchmark output and the readability of the benchmark code. ChangeLog: 2014-04-11 Will Newton <will.newton@linaro.org> * benchtests/Makefile (extra-objs): Add json-lib.o. (bench-func): Tidy up JSON output. * benchtests/bench-skeleton.c: Include json-lib.h. (main): Use JSON library functions to do output of benchmark results. * benchtests/bench-timing-type.c (main): Output the timing type simply, leaving formatting to the user. * benchtests/json-lib.c: New file. * benchtests/json-lib.h: Likewise.
2014-04-11Fixed and unified pthread_once.Torvald Riegel11-735/+149
[BZ #15215] This unifies various pthread_once architecture-specific implementations which were using the same algorithm with slightly different implementations. It also adds missing memory barriers that are required for correctness.
2014-04-11S/390: Unify 31 and 64 bit configure.acStefan Liebler5-12/+9
2014-04-11NEWS: Add comment about changed ABI on s390 and s390x.Andreas Krebbel1-0/+14
2014-04-11Fix typo in comment in res_query.cJoseph Anthony Pasquale Holsten2-1/+5
2014-04-11malloc: Fix MALLOC_DEBUG -Wundef warningWill Newton2-1/+11
MALLOC_DEBUG is set optionally on the command line. Default the value to zero if it is not set on the command line, and test its value with #if rather than #ifdef. Verified the code is identical before and after this change apart from line numbers. ChangeLog: 2014-04-11 Will Newton <will.newton@linaro.org> * malloc/malloc.c [!MALLOC_DEBUG]: #define MALLOC_DEBUG to zero if it is not defined elsewhere. (mtrim): Test the value of MALLOC_DEBUG with #if rather than #ifdef.
2014-04-10benchtests: Add pthread_once common-case test.Torvald Riegel5-1/+44
We have a single thread that runs a no-op initialization once and then repeatedly runs checks of the initialization (i.e., an acquire load and conditional jump) in a tight loop. This gives us, on average, the best-case latency of pthread_once (the initialization is the exactly-once slow path, and we're not looking at initialization-related synchronization overheads in this case).
2014-04-09Save/restore bound registers in _dl_runtime_resolveIgor Zamyatin5-20/+145
This patch saves and restores bound registers in symbol lookup for x86-64: 1. Branches without BND prefix clear bound registers. 2. x86-64 pass bounds in bound registers as specified in MPX psABI extension on hjl/mpx/master branch at https://github.com/hjl-tools/x86-64-psABI https://groups.google.com/forum/#!topic/x86-64-abi/KFsB0XTgWYc Binutils has been updated to create an alternate PLT to add BND prefix when branching to ld.so. * config.h.in (HAVE_MPX_SUPPORT): New #undef. * sysdeps/x86_64/configure.ac: Set HAVE_MPX_SUPPORT. * sysdeps/x86_64/configure: Regenerated. * sysdeps/x86_64/dl-trampoline.S (REGISTER_SAVE_AREA): New macro. (REGISTER_SAVE_RAX): Likewise. (REGISTER_SAVE_RCX): Likewise. (REGISTER_SAVE_RDX): Likewise. (REGISTER_SAVE_RSI): Likewise. (REGISTER_SAVE_RDI): Likewise. (REGISTER_SAVE_R8): Likewise. (REGISTER_SAVE_R9): Likewise. (REGISTER_SAVE_BND0): Likewise. (REGISTER_SAVE_BND1): Likewise. (REGISTER_SAVE_BND2): Likewise. (_dl_runtime_resolve): Use them. Save and restore Intel MPX bound registers when calling _dl_fixup.
2014-04-09Define _STRING_ARCH_unaligned unconditionallyAdhemerval Zanella10-16/+31
This patch defines _STRING_ARCH_unaligned to 0 on default bits/string.h header to avoid undefined compiler warnings on platforms that do not define it. It also make adjustments in code where tests checked if macro existed or not.
2014-04-09Use statvfs64() for pathconf(_PC_NAME_MAX).Peter TB Brett3-17/+15
pathconf(_PC_NAME_MAX) was implemented on top of statfs(). The 32bit version therefore fails EOVERFLOW if the filesystem blockcount is sufficiently large. Most pathconf() queries use statvfs64(), which avoids this issue. This patch modifies pathconf(_PC_NAME_MAX) to do likewise.
2014-04-09Move __PTHREAD_SPINS definition to architecture specific headerAdhemerval Zanella17-13/+79
This patch moves the __PTHREAD_SPINS definition to arch specific header since pthread_mutex_t layout is also arch specific. This leads to no need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the undefined compiler warning.
2014-04-09PowerPC: Fix --disable-multi-arch buildsAdhemerval Zanella11-6/+31
This patch fixes some powerpc32 and powerpc64 builds with --disable-multi-arch option along with different --with-cpu=powerN. It cleanups the Implies directories by removing the multiarch folder for non multiarch config and also fixing two assembly implementations: powerpc64/power7/strncat.S that is calling the wrong strlen; and power8/fpu/s_isnan.S that misses the hidden_def and weak_alias directives.
2014-04-08manual/ipc.texi: Fix AC-safety notes.Carlos O'Donell2-2/+6
The function sem_close is AC-unsafe because lll_lock* leaks a lock (aculock) and not because of twalk.
2014-04-07string: Cosmetic cleanup of string functionsWill Newton11-47/+29
Clean up string functions that do not have a version in gnulib on the assumption that glibc is the canonical upstream copy of this code. basename has a copy in gnulib but it is largely written to handle Windows paths so merging it is not really viable. The changes mostly consist of switching to ANSI function prototypes and removing unused includes. As many of these functions do not get built in a typical build due to architecture optimized versions being used instead I built these by hand to verify there were no build warnings and the code was identical. 2014-04-07 Will Newton <will.newton@linaro.org> * string/basename.c [HAVE_CONFIG_H]: Remove #ifdef and and contents. [!_LIBC] Remove #ifndef and contents. (basename): Use ANSI prototype. [_LIBC] Remove #idef. * string/memccpy.c (__memccpy): Use ANSI prototype. * string/memfrob.c (memfrob): Likewise. * string/strcoll.c (STRCOLL): Likewise. * string/strlen.c (strlen): Likewise. * string/strtok.c (STRTOK): Likewise. * string/strcat.c: Remove unused #include of memcopy.h. (strcat): Use ANSI prototype. * string/strchr.c: Remove unused #include of memcopy.h. (strchr): Use ANSI prototype. * string/strcmp.c: Remove unused #include of memcopy.h. (strcmp): Use ANSI prototype. * string/strcpy.c: Remove unused #include of memcopy.h. (strcpy): Use ANSI prototype.
2014-04-06PowerPC: define _CALL_ELF if compiler does notAdhemerval Zanella7-5/+65
This patch makes the configure adds -D_CALL_ELF=1 when compiler does not define _CALL_ELF (versions before powerpc64le support). It cleans up compiler warnings on old compiler where _CALL_ELF is not defined on powerpc64(be) builds. It does by add a new config.make variable for configure-deduced CPPFLAGS and accumulate into that (confix-extra-cppflags). It also generalizes libc_extra_cflags so it accumulates in sysdeps configure fragmenets.
2014-04-06PowerPC: Fix nearbyint/nearbyintf result for FE_DOWNWARDAdhemerval Zanella5-11/+213
This patch fixes the powerpc32 optimized nearbyint/nearbyintf bogus results for FE_DOWNWARD rounding mode. This is due wrong instructions sequence used in the rounding calculation (two subtractions instead of adition and a subtraction). Fixes BZ#16815.
2014-04-04tile: Fix cut-and-paste bug in commit fcccd5128.Chris Metcalf2-2/+7
2014-04-03manual: clarify buffer behavior in getline [BZ #5666]David Svoboda2-1/+8
If the user has requested automatic buffer creation, getline may create it and not free things when an error occurs. That means the user is always responsible for calling free() regardless of the return value. The current documentation does not explicitly cover this which leaves it slightly ambiguous to the reader. So clarify things. URL: https://sourceware.org/bugzilla/show_bug.cgi?id=5666
2014-04-03Factor mmap/munmap of PT_LOAD segments out of _dl_map_object_from_fd et al.Roland McGrath15-214/+391
2014-04-03elf/dl-lookup.c: Remove obsolete comment about nested functionWill Newton2-5/+10
The nested function referred to has gone away so remove the comment. Also move the variable declaration down to where other variables of a similar lifetime are declared for clarity. 2014-04-03 Will Newton <will.newton@linaro.org> * elf/dl-lookup.c (do_lookup_x): Remove comment referring to nested function and move variable declarations down to before first use.
2014-04-02Fix catan, catanh, __ieee754_logf in round-downward mode (bug 16799, bug 16800).Joseph Myers12-14/+242
This patch fixes incorrect results from catan and catanh of certain special inputs in round-downward mode (bug 16799), and incorrect results of __ieee754_logf (+/-0) in round-downward mode (bug 16800) that show up through catan/catanh when tested in all rounding modes, but not directly in the testing for logf because the bug gets hidden by the wrappers. Both bugs involve a zero that should be +0 being -0 instead: one computed as (1-x)*(1+x) in the catan/catanh case, and one as (x-x) in the logf case. The fixes ensure positive zero is used. Testing of catan and catanh in all rounding modes is duly enabled. I expect there are various other bugs in special cases in __ieee754_* functions that are normally hidden by the wrappers but would show up for testing with -lieee (or in future with -fno-math-errno if we replace -lieee and _LIB_VERSION with compile-time redirection to new *_noerrno symbol names). Tested x86_64 and x86 and ulps updated accordingly. [BZ #16799] [BZ #16800] * math/s_catan.c (__catan): Avoid passing -0 denominator to atan2 with 0 numerator. * math/s_catanf.c (__catanf): Likewise. * math/s_catanh.c (__catanh): Likewise. * math/s_catanhf.c (__catanhf): Likewise. * math/s_catanhl.c (__catanhl): Likewise. * math/s_catanl.c (__catanl): Likewise. * sysdeps/ieee754/flt-32/e_logf.c (__ieee754_logf): Always divide by positive zero when computing -Inf result. * math/libm-test.inc (catan_test): Use ALL_RM_TEST. (catanh_test): Likewise. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-04-02Fix clog / clog10 sign of zero result in round-downward mode (bug 16789).Joseph Myers11-36/+233
This patch fixes bug 16789, incorrect sign of (real part) zero result from clog and clog10 in round-downward mode, arising from that real part being computed as 0 - 0. To ensure that an underflow exception occurred, the code used an underflowing value (the next term in the series for log1p) in arithmetic computing the real part of the result, yielding the problematic 0 - 0 computation in some cases even when the mathematical result would be small but positive. The patch changes this code to use the math_force_eval approach to ensuring that an underflowing computation actually occurs. Tests of clog and clog10 are enabled in all rounding modes. Tested x86_64 and x86 and ulps updated accordingly. [BZ #16789] * math/s_clog.c (__clog): Use math_force_eval to ensure underflow instead of using underflowing value in computing result. * math/s_clog10.c (__clog10): Likewise. * math/s_clog10f.c (__clog10f): Likewise. * math/s_clog10l.c (__clog10l): Likewise. * math/s_clogf.c (__clogf): Likewise. * math/s_clogl.c (__clogl): Likewise. * math/libm-test.inc (clog_test): Use ALL_RM_TEST. (clog10_test): Likewise. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-04-02Correct IBM long double nextafterl.Alan Modra4-17/+52
Fix for values near a power of two, and some tidies. [BZ #16739] * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Correct output when value is near a power of two. Use int64_t for lx and remove casts. Use decimal rather than hex exponent constants. Don't use long double multiplication when double will suffice. * math/libm-test.inc (nextafter_test_data): Add tests. * NEWS: Add 16739 and 16786 to bug list.
2014-04-02Correct prefetch hint in power7 memrchr.Alan Modra2-1/+5
Typo fix. * sysdeps/powerpc/powerpc64/power7/memrchr.S: Correct stream hint.
2014-04-02Fix reference to toc symbol.Alan Modra2-1/+5
https://sourceware.org/ml/binutils/2014-03/msg00033.html removes the "magic" treatment of symbols defined in a .toc section. * sysdeps/powerpc/powerpc64/start.S: Add @toc to toc symbol reference.