glibc/sysdeps
H.J. Lu b9eb92ab05 Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT
According to Silvermont software optimization guide, for 64-bit
applications, branch prediction performance can be negatively impacted
when the target of a branch is more than 4GB away from the branch.  Add
the Prefer_MAP_32BIT_EXEC bit so that mmap will try to map executable
pages with MAP_32BIT first.  NB: MAP_32BIT will map to lower 2GB, not
lower 4GB, address.  Prefer_MAP_32BIT_EXEC reduces bits available for
address space layout randomization (ASLR), which is always disabled for
SUID programs and can only be enabled by setting environment variable,
LD_PREFER_MAP_32BIT_EXEC.

On Fedora 23, this patch speeds up GCC 5 testsuite by 3% on Silvermont.

	[BZ #19367]
	* sysdeps/unix/sysv/linux/wordsize-64/mmap.c: New file.
	* sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/mmap.c: Likewise.
	* sysdeps/x86/cpu-features.h (bit_Prefer_MAP_32BIT_EXEC): New.
	(index_Prefer_MAP_32BIT_EXEC): Likewise.
2015-12-15 13:16:02 -08:00
..
aarch64 [AArch64] Regenerate libm-test-ulps 2015-12-01 12:57:16 +00:00
alpha Move bits/atomic.h to atomic-machine.h (bug 14912). 2015-09-11 20:00:19 +00:00
arm math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
generic Replace MUTEX_INITIALIZER with _LIBC_LOCK_INITIALIZER in generic code 2015-11-24 16:37:15 +01:00
gnu Rename localedir to complocaledir (bug 14259). 2015-11-27 10:22:38 -05:00
hppa Fix math_private.h multiple include guards. 2015-11-20 23:46:23 +00:00
i386 Fix hurd build with hidden support 2015-11-25 02:35:18 +01:00
ia64 Fix lgamma setting signgam for ISO C (bug 15421). 2015-11-20 22:49:59 +00:00
ieee754 Fix indentation. 2015-12-11 09:19:37 -08:00
init_array NPTL: Initializer for .init_array-only configurations. 2015-02-13 13:19:11 -08:00
m68k math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
mach Add __CPU_MASK_TYPE for __cpu_mask 2015-12-01 10:25:44 -08:00
microblaze math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
mips mips: fix testsuite build for O32 FPXX ABI on pre-R2 CPU 2015-12-09 19:03:46 +01:00
nacl Add __CPU_MASK_TYPE for __cpu_mask 2015-12-01 10:25:44 -08:00
nios2 math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
nptl Replace MUTEX_INITIALIZER with _LIBC_LOCK_INITIALIZER in generic code 2015-11-24 16:37:15 +01:00
posix Remove signal handling for nanosleep (bug 16364) 2015-11-20 11:16:07 -02:00
powerpc powerpc: Add hwcap/hwcap2/platform data to TCB. 2015-12-03 13:56:13 -02:00
pthread Convert 113 more function definitions to prototype style (files with assertions). 2015-10-20 11:54:09 +00:00
s390 S390: Use __asm__ instead of asm. 2015-11-20 08:56:40 +01:00
sh math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
sparc Convert 69 more function definitions to prototype style (line wrap cases). 2015-10-19 21:23:47 +00:00
tile tile: define __NO_LONG_DOUBLE_MATH 2015-11-24 14:09:31 -05:00
unix Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT 2015-12-15 13:16:02 -08:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
wordsize-64 Add LFS support for fts functions (bug 11460) 2015-11-06 11:24:16 +01:00
x86 Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT 2015-12-15 13:16:02 -08:00
x86_64 Better workaround for aliases of *_finite symbols in vector math library. 2015-11-27 16:22:26 +03:00