Commit Graph

1532 Commits

Author SHA1 Message Date
Ryan S. Arnold 1ae8bfe07c Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type. 2013-06-28 16:50:48 -05:00
Mike Frysinger 17db6e8d6b [BZ #10283] localedef: align fixed maps to SHMLBA
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>
2013-06-24 20:26:58 -04:00
Adhemerval Zanella 6a97b62a5b Fix unsafe compiler optimization
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.
2013-06-12 10:21:22 -05:00
Siddhesh Poyarekar 2506109403 Set/restore rounding mode only when needed
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.
2013-06-12 10:36:48 +05:30
Joseph Myers f1d73d30df Add exception information to math-tests.h and use it in libm-test.inc. 2013-06-11 15:44:31 +00:00
Joseph Myers 0efa6f8b99 Add rounding mode information to math-tests.h and use it in libm-test.inc. 2013-06-10 12:34:49 +00:00
Joseph Myers 2e09a79ada Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
Ondrej Bilka 350635a59a Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
Siddhesh Poyarekar 4c60cb0c83 Skip modifying exception mask and flags in SET_RESTORE_ROUND_53BIT
We only need to set/restore rounding mode to ensure correct
computation for non-default rounding modes.
2013-06-05 13:56:19 +05:30
Siddhesh Poyarekar b937534868 Avoid crashing in LD_DEBUG when program name is unavailable
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.
2013-05-29 21:34:12 +05:30
Ryan S. Arnold e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Joseph Myers d8cd06db62 Improve tgamma accuracy (bugs 2546, 2560, 5159, 15426). 2013-05-08 11:58:18 +00:00
Roland McGrath 8347c74cc5 Declare _dl_skip_args in ldsodefs.h header. 2013-05-07 14:49:26 -07:00
Roland McGrath 962e6658a3 Flesh out stub not-cancel.h file. 2013-05-06 16:03:35 -07:00
Paul Pluzhnikov 1ef74943ce Get rid of __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS 2013-04-25 11:08:31 -07:00
Thomas Schwinge 572676160d New <math.h> macro named issignaling to check for a signaling NaN (sNaN).
It is based on draft TS 18661 and currently enabled as a GNU extension.
2013-04-02 13:51:02 +02:00
Roland McGrath dc0a026385 Make _dl_phdr pointer to const. 2013-03-28 15:39:32 -07:00
Roland McGrath 3d3436ae68 Consolidate declarations of _dl_phdr, _dl_phnum. 2013-03-28 15:33:57 -07:00
Thomas Schwinge 5aa4a1a1fd On 32-bit x86, disable certain tests involving sNaN values.
Follow-up to commit 495ded2c8c.
2013-03-21 16:05:29 +01:00
Roland McGrath bc16e260d0 Move _dl_non_dynamic_init, _dl_aux_init declarations. 2013-03-15 14:32:04 -07:00
Joseph Myers 2d67d91ac0 Remove powerpc64 bounded-pointers code. 2013-03-06 00:10:21 +00:00
Roland McGrath 7775448e57 Fix NEED_DL_SYSINFO_DSO conditionals. 2013-03-01 14:44:44 -08:00
Mike Frysinger 6ff444c418 unify xmalloc prototypes & friends
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>
2013-02-18 17:16:05 -05:00
Siddhesh Poyarekar be179c8a36 New function _dl_find_dso_for_object
Consolidate code to search for an address within a DSO.
2013-02-18 18:00:17 +05:30
Joseph Myers 70d9946a44 Remove __ptrvalue, __bounded and __unbounded. 2013-02-13 23:30:40 +00:00
Joseph Myers a2da1673fe Remove CHECK_N and bp-checks.h. 2013-02-08 20:06:30 +00:00
Carlos O'Donell b39949d211 ARM: Support loading unmarked objects from cache.
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>
2013-02-08 12:26:12 -05:00
Joseph Myers f3aae3f3eb Remove CHECK_1 and CHECK_1_NULL_OK. 2013-02-08 01:12:11 +00:00
Joseph Myers b2c9eff43c Remove CHECK_BOUNDS_LOW and CHECK_BOUNDS_HIGH for C code. 2013-02-08 01:10:40 +00:00
Roland McGrath eab55bfb14 Add missing includes to sysdeps/generic/malloc-sysdep.h. 2013-02-05 11:34:06 -08:00
Joseph Myers 6277fdabc0 Remove CHECK_STRING, CHECK_STRING_NULL_OK and __ubp_memchr. 2013-02-04 16:29:39 +00:00
Joseph Myers e782a927c2 Remove BOUNDED_N and BOUNDED_1. 2013-02-01 06:35:29 +00:00
Joseph Myers 3a7ac8a0f5 Remove bp-start.h and INIT_ARGV_and_ENVIRON. 2013-02-01 00:06:18 +00:00
Joseph Myers f3499f95c8 Remove CHECK_IOCTL, CHECK_FCNTL and CHECK_N_PAGES. 2013-01-31 23:01:01 +00:00
Joseph Myers 32a45bea39 Remove CHECK_SIGSET and CHECK_SIGSET_NULL_OK. 2013-01-31 23:00:15 +00:00
Joseph Myers 2e8a5c8c46 Remove bp-semctl.h and CHECK_SEMCTL. 2013-01-31 22:59:04 +00:00
Joseph Myers c2d549290d Remove bp-thunks code. 2013-01-31 22:57:06 +00:00
Joseph Myers 828beb132d Use __extension__ with long long in installed headers. 2013-01-10 20:19:45 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
Chris Metcalf 82123268ac Fix warnings from generic _FPU_GETCW 2012-12-06 10:42:06 -05:00
David S. Miller c8df52eccf Fix sparc build with older compilers.
* sysdeps/generic/memcopy.h: Add multiple inclusion protection.
2012-12-04 16:05:57 -05:00
Joseph Myers 4cf77aa984 Fix strict-aliasing warnings from unwind-dw2-fde.c. 2012-11-27 00:01:10 +00:00
Joseph Myers 79c9b9feb4 Mark unwind-dw2-fde-glibc.c variable possibly unused. 2012-11-22 16:47:54 +00:00
Steve McIntyre 1f51ee9246 Add ldconfig cache tag handling for AArch64
* sysdeps/generic/ldconfig.h (FLAG_AARCH64_LIB64): New macro.
	* elf/cache.c (print_entry): Print ",AArch64" for
	FLAG_AARCH64_LIB64.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
2012-11-19 01:22:33 -05:00
Steve McIntyre 6665d4a25d Add ldconfig cache tag handling for ARM hard-float ABI
* sysdeps/generic/ldconfig.h (FLAG_ARM_LIBHF): New macro.
	* elf/cache.c (print_entry): Print ",hard-float" for
	FLAG_ARM_LIBHF.

Signed-off-by: Steve McIntyre <steve.mcintyre@linaro.org>
Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
2012-11-19 01:12:53 -05:00
Pino Toscano a20492cffc generic paths.h: remove old paths from _PATH_STDPATH
Remove /usr/contrib/bin and /usr/old/bin from _PATH_STDPATH, since they seem
to be part only of old BSDs, Solaris and HP-UX.
2012-11-04 10:11:39 +01:00
Pino Toscano 72e182e38d Fix small indendation issues in paths.h files 2012-11-04 10:10:58 +01:00
Joseph Myers 5b5b04d628 Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796). 2012-11-03 19:48:53 +00:00
Joseph Myers 2a27fd6dae Fix strtod handling of underflow (bug 14047). 2012-10-30 13:51:27 +00:00