glibc/sysdeps/x86
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
..
bits Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
fpu Utilize x86_64 vector math functions w/o -fopenmp. 2015-12-07 21:58:26 +03:00
cpu-features-offsets.sym Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
cpu-features.c Enable Silvermont optimizations for Knights Landing 2015-12-15 11:46:54 -08:00
cpu-features.h Add Prefer_MAP_32BIT_EXEC to map executable pages with MAP_32BIT 2015-12-15 13:16:02 -08:00
dl-get-cpu-features.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
elide.h nptl: Document crash due to incorrect use of locks 2015-08-20 08:44:37 +02:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
init-arch.h Detect and select i586/i686 implementation at run-time 2015-08-27 09:06:44 -07:00
libc-start.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
Makefile Run tst-prelink test for GLOB_DAT reloc 2015-11-14 12:00:38 -08:00
rtld-global-offsets.sym Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
tininess.h Use sysdeps/x86/tininess.h for i386 and x86_64 2012-10-30 20:38:31 -07:00
tst-get-cpu-features-static.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
tst-get-cpu-features.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
Versions Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00