summaryrefslogtreecommitdiff
path: root/sysdeps/generic
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Patch 3/4 of the effort to make TLS access async-signal-safe."Allan McRae2014-02-061-5/+0
| | | | This reverts commit 35e8f7ab94c910659de9d507aa0f3e1f8973d914.
* Revert "Patch 2/4 of the effort to make TLS access async-signal-safe."Allan McRae2014-02-061-6/+0
| | | | | | | | | | | | | This reverts commit 1f33d36a8a9e78c81bed59b47f260723f56bb7e6. Conflicts: elf/dl-misc.c Also reverts the follow commits that were bug fixes to new code introduced in the above commit: 063b2acbce83549df82ab30f5af573f1b9c4bd19 b627fdd58554bc36bd344dc40a8787c4b7a9cc46 e81c64bba13d2d8b2a4e53254a82cc80f27c8497
* ARM: Disable compat mcount code when unneeded.Roland McGrath2014-01-101-0/+42
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-0175-75/+75
|
* Patch 2/4 of the effort to make TLS access async-signal-safe.Paul Pluzhnikov2013-12-181-0/+6
| | | | | | | | | | | | | | | | | Add a signal-safe malloc replacement. 2013-12-18 Andrew Hunter <ahh@google.com> * sysdeps/generic/ldsodefs.h (__signal_safe_memalign): New prototype. (__signal_safe_malloc, __signal_safe_free): Likewise. (__signal_safe_realloc, __signal_safe_calloc): Likewise. * elf/dl-misc.c (__signal_safe_allocator_header): New struct. (__signal_safe_memalign, __signal_safe_malloc): New function. (__signal_safe_free, __signal_safe_realloc): Likewise. (__signal_safe_calloc): Likewise. * elf/dl-tls.c (allocate_dtv, _dl_clear_dtv): Call signal-safe functions. (_dl_deallocate_tls, _dl_update_slotinfo): Likewise.
* Patch 3/4 of the effort to make TLS access async-signal-safe.Paul Pluzhnikov2013-12-181-0/+5
| | | | | | | | | | | Factor out _dl_clear_dtv. 2013-12-18 Andrew Hunter <ahh@google.com> * elf/Versions (ld): Add _dl_clear_dtv. * sysdeps/generic/ldsodefs.h (_dl_clear_dtv): New prototype. * elf/dl-tls.c (_dl_clear_dtv): New function. * nptl/allocatestack.c (get_cached_stack): Call _dl_clear_dtv.
* Patch [1/4] async-signal safe TLS.Paul Pluzhnikov2013-12-181-0/+5
| | | | | | | | | | | | | 2013-12-18 Andrew Hunter <ahh@google.com> * sysdeps/generic/ldsodefs.h (_dl_mask_all_signals): New prototype. (_dl_unmask_signals): Likewise. * sysdeps/mach/hurd/dl-sysdep.h (_dl_mask_all_signals): New stub. (_dl_unmask_all_signals): Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.h (_dl_mask_all_signals): New prototype. (_dl_unmask_all_signals): Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.c (_dl_mask_all_signals): New function. (_dl_unmask_signals): Likewise.
* Adjust generic swapon prototype to match Linux version.Roland McGrath2013-11-211-1/+1
|
* Don't use broken DL_AUTO_FUNCTION_ADDRESS()Guy Martin2013-11-211-2/+3
| | | | | | | | | | | | On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the variable fptr[2] in it's own scope. The content of fptr[] is thus undefined right after the macro exits. Newer gcc's (>= 4.7) reuse the stack space of this variable triggering a segmentation fault in dl-init.c:69. To fix this we rewrite the macros to make the call directly to init and fini without needing to pass back a constructed function pointer.
* Consolidate multiple precision sin/cos functionsSiddhesh Poyarekar2013-10-081-4/+2
|
* BZ #15754: Fix test case for ARM.Carlos O'Donell2013-09-231-1/+6
| | | | | | | Statically built binaries use __pointer_chk_guard_local, while dynamically built binaries use __pointer_chk_guard. Provide the right definition depending on the test case we are building.
* BZ #15754: CVE-2013-4788Carlos O'Donell2013-09-231-0/+3
| | | | | | | | | | | | The pointer guard used for pointer mangling was not initialized for static applications resulting in the security feature being disabled. The pointer guard is now correctly initialized to a random value for static applications. Existing static applications need to be recompiled to take advantage of the fix. The test tst-ptrguard1-static and tst-ptrguard1 add regression coverage to ensure the pointer guards are sufficiently random and initialized to a default value.
* MIPS: IEEE 754-2008 NaN encoding supportMaciej W. Rozycki2013-09-181-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been a long practice for software using IEEE 754 floating-point arithmetic run on MIPS processors to use an encoding of Not-a-Number (NaN) data different to one used by software run on other processors. And as of IEEE 754-2008 revision [1] this encoding does not follow one recommended in the standard, as specified in section 6.2.1, where it is stated that quiet NaNs should have the first bit (d1) of their significand set to 1 while signalling NaNs should have that bit set to 0, but MIPS software interprets the two bits in the opposite manner. As from revision 3.50 [2][3] the MIPS Architecture provides for processors that support the IEEE 754-2008 preferred NaN encoding format. As the two formats (further referred to as "legacy NaN" and "2008 NaN") are incompatible to each other, tools have to provide support for the two formats to help people avoid using incompatible binary modules. The change is comprised of two functional groups of features, both of which are required for correct support. 1. Dynamic linker support. To enforce the NaN encoding requirement in dynamic linking a new ELF file header flag has been defined. This flag is set for 2008-NaN shared modules and executables and clear for legacy-NaN ones. The dynamic linker silently ignores any incompatible modules it encounters in dependency processing. To avoid unnecessary processing of incompatible modules in the presence of a shared module cache, a set of new cache flags has been defined to mark 2008-NaN modules for the three ABIs supported. Changes to sysdeps/unix/sysv/linux/mips/readelflib.c have been made following an earlier code quality suggestion made here: http://sourceware.org/ml/libc-ports/2009-03/msg00036.html and are therefore a little bit more extensive than the minimum required. Finally a new name has been defined for the dynamic linker so that 2008-NaN and legacy-NaN binaries can coexist on a single system that supports dual-mode operation and that a legacy dynamic linker that does not support verifying the 2008-NaN ELF file header flag is not chosen to interpret a 2008-NaN binary by accident. 2. Floating environment support. IEEE 754-2008 features are controlled in the Floating-Point Control and Status (FCSR) register and updates are needed to floating environment support so that the 2008-NaN flag is set correctly and the kernel default, inferred from the 2008-NaN ELF file header flag at the time an executable is loaded, respected. As the NaN encoding format is a property of GCC code generation that is both a user-selected GCC configuration default and can be overridden with GCC options, code that needs to know what NaN encoding standard it has been configured for checks for the __mips_nan2008 macro that is defined internally by GCC whenever the 2008-NaN mode has been selected. This mode is determined at the glibc configuration time and therefore a few consistency checks have been added to catch cases where compilation flags have been overridden by the user. The 2008 NaN set of features relies on kernel support as the in-kernel floating-point emulator needs to be aware of the NaN encoding used even on hard-float processors and configure the FPU context according to the value of the 2008 NaN ELF file header flag of the executable being started. As at this time work on kernel support is still in progress and the relevant changes have not made their way yet to linux.org master repository. Therefore the minimum version supported has been artificially set to 10.0.0 so that 2008-NaN code is not accidentally run on a Linux kernel that does not suppport it. It is anticipated that the version is adjusted later on to the actual initial linux.org kernel version to support this feature. Legacy NaN encoding support is unaffected, older kernel versions remain supported. [1] "IEEE Standard for Floating-Point Arithmetic", IEEE Computer Society, IEEE Std 754-2008, 29 August 2008 [2] "MIPS Architecture For Programmers, Volume I-A: Introduction to the MIPS32 Architecture", MIPS Technologies, Inc., Document Number: MD00082, Revision 3.50, September 20, 2012 [3] "MIPS Architecture For Programmers, Volume I-A: Introduction to the MIPS64 Architecture", MIPS Technologies, Inc., Document Number: MD00083, Revision 3.50, September 20, 2012
* Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.Ryan S. Arnold2013-06-282-1/+5
|
* [BZ #10283] localedef: align fixed maps to SHMLBAMike Frysinger2013-06-241-0/+26
| | | | | | | | | | | | Many Linux arches require fixed mmaps to be aligned higher than pagesize, so use the SHMLBA define as it represents this quantity exactly. This fixes spurious errors seen on those arches like: cannot map archive header: Invalid argument URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10283 Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix unsafe compiler optimizationAdhemerval Zanella2013-06-121-1/+6
| | | | | | | | GCC 4.8 enables -ftree-loop-distribute-patterns at -O3 by default and this optimization may transform loops into memset/memmove calls. Without proper handling this may generate unexpected PLT calls on GLIBC. This patch fixes by create memset/memmove alias to internal GLIBC __GI_memset/__GI_memmove symbols.
* Set/restore rounding mode only when neededSiddhesh Poyarekar2013-06-121-14/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most common use case of math functions is with default rounding mode, i.e. rounding to nearest. Setting and restoring rounding mode is an unnecessary overhead for this, so I've added support for a context, which does the set/restore only if the FP status needs a change. The code is written such that only x86 uses these. Other architectures should be unaffected by it, but would definitely benefit if the set/restore has as much overhead relative to the rest of the code, as the x86 bits do. Here's a summary of the performance improvement due to these improvements; I've only mentioned functions that use the set/restore and have benchmark inputs for x86_64: Before: cos(): ITERS:4.69335e+08: TOTAL:28884.6Mcy, MAX:4080.28cy, MIN:57.562cy, 16248.6 calls/Mcy exp(): ITERS:4.47604e+08: TOTAL:28796.2Mcy, MAX:207.721cy, MIN:62.385cy, 15543.9 calls/Mcy pow(): ITERS:1.63485e+08: TOTAL:28879.9Mcy, MAX:362.255cy, MIN:172.469cy, 5660.86 calls/Mcy sin(): ITERS:3.89578e+08: TOTAL:28900Mcy, MAX:704.859cy, MIN:47.583cy, 13480.2 calls/Mcy tan(): ITERS:7.0971e+07: TOTAL:28902.2Mcy, MAX:1357.79cy, MIN:388.58cy, 2455.55 calls/Mcy After: cos(): ITERS:6.0014e+08: TOTAL:28875.9Mcy, MAX:364.283cy, MIN:45.716cy, 20783.4 calls/Mcy exp(): ITERS:5.48578e+08: TOTAL:28764.9Mcy, MAX:191.617cy, MIN:51.011cy, 19071.1 calls/Mcy pow(): ITERS:1.70013e+08: TOTAL:28873.6Mcy, MAX:689.522cy, MIN:163.989cy, 5888.18 calls/Mcy sin(): ITERS:4.64079e+08: TOTAL:28891.5Mcy, MAX:6959.3cy, MIN:36.189cy, 16062.8 calls/Mcy tan(): ITERS:7.2354e+07: TOTAL:28898.9Mcy, MAX:1295.57cy, MIN:380.698cy, 2503.7 calls/Mcy So the improvements are: cos: 27.9089% exp: 22.6919% pow: 4.01564% sin: 19.1585% tan: 1.96086% The downside of the change is that it will have an adverse performance impact on non-default rounding modes, but I think the tradeoff is justified.
* Add exception information to math-tests.h and use it in libm-test.inc.Joseph Myers2013-06-111-0/+18
|
* Add rounding mode information to math-tests.h and use it in libm-test.inc.Joseph Myers2013-06-101-0/+18
|
* Avoid use of "register" as optimization hint.Joseph Myers2013-06-071-2/+2
|
* Fix leading whitespaces.Ondrej Bilka2013-06-061-1/+1
|
* Skip modifying exception mask and flags in SET_RESTORE_ROUND_53BITSiddhesh Poyarekar2013-06-051-6/+6
| | | | | We only need to set/restore rounding mode to ensure correct computation for non-default rounding modes.
* Avoid crashing in LD_DEBUG when program name is unavailableSiddhesh Poyarekar2013-05-291-0/+5
| | | | | | | | | Resolves: #15465 The program name may be unavailable if the user application tampers with argc and argv[]. Some parts of the dynamic linker caters for this while others don't, so this patch consolidates the check and fallback into a single macro and updates all users.
* Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold2013-05-163-0/+4
|
* Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426).Joseph Myers2013-05-081-0/+12
|
* Declare _dl_skip_args in ldsodefs.h header.Roland McGrath2013-05-071-0/+10
|
* Flesh out stub not-cancel.h file.Roland McGrath2013-05-061-0/+8
|
* Get rid of __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROSPaul Pluzhnikov2013-04-252-20/+0
|
* New <math.h> macro named issignaling to check for a signaling NaN (sNaN).Thomas Schwinge2013-04-021-0/+6
| | | | It is based on draft TS 18661 and currently enabled as a GNU extension.
* Make _dl_phdr pointer to const.Roland McGrath2013-03-281-1/+1
|
* Consolidate declarations of _dl_phdr, _dl_phnum.Roland McGrath2013-03-281-0/+6
|
* On 32-bit x86, disable certain tests involving sNaN values.Thomas Schwinge2013-03-211-0/+36
| | | | Follow-up to commit 495ded2c8c1eb8c0ac4b54add2dd397852e19cba.
* Move _dl_non_dynamic_init, _dl_aux_init declarations.Roland McGrath2013-03-151-0/+7
|
* Remove powerpc64 bounded-pointers code.Joseph Myers2013-03-061-25/+0
|
* Fix NEED_DL_SYSINFO_DSO conditionals.Roland McGrath2013-03-011-1/+1
|
* unify xmalloc prototypes & friendsMike Frysinger2013-02-181-7/+1
| | | | | | | | These prototypes are duplicated in many places. Add a dedicated header for holding prototypes for program-specific functions to avoid that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* New function _dl_find_dso_for_objectSiddhesh Poyarekar2013-02-181-0/+4
| | | | Consolidate code to search for an address within a DSO.
* Remove __ptrvalue, __bounded and __unbounded.Joseph Myers2013-02-131-2/+2
|
* Remove CHECK_N and bp-checks.h.Joseph Myers2013-02-081-49/+0
|
* ARM: Support loading unmarked objects from cache.Carlos O'Donell2013-02-081-0/+1
| | | | | | | | | | | | ARM now supports loading unmarked objects from the dynamic loader cache. Unmarked objects can be used with the hard-float or soft-float ABI. We must support loading unmarked objects during the transition period from a binutils that does not mark objects to one that does mark them with the correct ELF flags. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* Remove CHECK_1 and CHECK_1_NULL_OK.Joseph Myers2013-02-081-7/+0
|
* Remove CHECK_BOUNDS_LOW and CHECK_BOUNDS_HIGH for C code.Joseph Myers2013-02-081-12/+0
|
* Add missing includes to sysdeps/generic/malloc-sysdep.h.Roland McGrath2013-02-051-0/+3
|
* Remove CHECK_STRING, CHECK_STRING_NULL_OK and __ubp_memchr.Joseph Myers2013-02-041-16/+0
|
* Remove BOUNDED_N and BOUNDED_1.Joseph Myers2013-02-011-10/+0
|
* Remove bp-start.h and INIT_ARGV_and_ENVIRON.Joseph Myers2013-02-011-71/+0
|
* Remove CHECK_IOCTL, CHECK_FCNTL and CHECK_N_PAGES.Joseph Myers2013-01-311-27/+0
|
* Remove CHECK_SIGSET and CHECK_SIGSET_NULL_OK.Joseph Myers2013-01-311-7/+0
|
* Remove bp-semctl.h and CHECK_SEMCTL.Joseph Myers2013-01-311-66/+0
|
* Remove bp-thunks code.Joseph Myers2013-01-311-69/+0
|