binutils-gdb/ld/emultempl
H.J. Lu f6aec96dce ld: Add --enable-separate-code
This patch adds --enable-separate-code to ld configure to turn on
-z separate-code by default and enables it by default for Linux/x86.
This avoids mixing code pages with data to improve cache performance
as well as security.

To reduce x86-64 executable and shared object sizes, the maximum page
size is reduced from 2MB to 4KB when -z separate-code is turned on by
default.  Note: -z max-page-size= can be used to set the maximum page
size.

We compared SPEC CPU 2017 performance before and after this change on
Skylake server.  There are no any significant performance changes.
Everything is mostly below +/-1%.

bfd/

	* config.in: Regenerated.
	* configure: Likewise.
	* configure.ac: Add --enable-separate-code.
	(DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED.  Default
	to 1 for Linux/x86 targets,
	* elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
	DEFAULT_LD_Z_SEPARATE_CODE is 1.

ld/

	* NEWS: Mention --enable-separate-code.
	* configure.ac: Add --enable-separate-code.
	(DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED.
	* configure.tgt: Default ac_default_ld_z_separate_code to 1 for
	Linux/x86 targets.
	* config.in: Regenerated.
	* configure: Likewise.
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
	link_info.separate_code DEFAULT_LD_Z_SEPARATE_CODE.
2018-02-27 11:34:29 -08:00
..
README Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
aarch64elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
aix.em ld error/warning messages 2018-02-26 10:51:12 +10:30
alphaelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
arclinux.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
armcoff.em ld error/warning messages 2018-02-26 10:51:12 +10:30
armelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
astring.sed * emultempl/ostring.sed: Rename from stringify.sed. 1999-08-06 22:46:03 +00:00
avrelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
beos.em ld error/warning messages 2018-02-26 10:51:12 +10:30
bfin.em ld error/warning messages 2018-02-26 10:51:12 +10:30
cr16elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
crxelf.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
elf-generic.em ld error/warning messages 2018-02-26 10:51:12 +10:30
elf32.em ld: Add --enable-separate-code 2018-02-27 11:34:29 -08:00
epiphanyelf_4x4.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
genelf.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
generic.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
gld960.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
gld960c.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
hppaelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
ia64elf.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
irix.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
linux.em ld error/warning messages 2018-02-26 10:51:12 +10:30
lnk960.em ld error/warning messages 2018-02-26 10:51:12 +10:30
m68hc1xelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
m68kcoff.em ld error/warning messages 2018-02-26 10:51:12 +10:30
m68kelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
metagelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
mipself.em ld error/warning messages 2018-02-26 10:51:12 +10:30
mmix-elfnmmo.em ld error/warning messages 2018-02-26 10:51:12 +10:30
mmixelf.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
mmo.em ld error/warning messages 2018-02-26 10:51:12 +10:30
msp430.em ld error/warning messages 2018-02-26 10:51:12 +10:30
nds32elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
needrelax.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
netbsd.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
nios2elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
ostring.sed * emultempl/ostring.sed: Rename from stringify.sed. 1999-08-06 22:46:03 +00:00
pe.em ld error/warning messages 2018-02-26 10:51:12 +10:30
pep.em ld error/warning messages 2018-02-26 10:51:12 +10:30
ppc32elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
ppc64elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
pruelf.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
riscvelf.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
rxelf.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
s390.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
scoreelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
sh64elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
solaris2.em solaris2.em: Fold after_allocation into before_allocation 2018-01-18 16:22:13 -08:00
spu_icache.S bfd/ 2009-03-17 12:46:19 +00:00
spu_icache.o_c Regenerate spu overlay and icache manager files 2014-11-04 22:36:13 +10:30
spu_ovl.S Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
spu_ovl.o_c Regenerate spu_ovl.o_c 2016-10-15 12:53:57 +10:30
spuelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
sunos.em ld error/warning messages 2018-02-26 10:51:12 +10:30
tic6xdsbt.em ld error/warning messages 2018-02-26 10:51:12 +10:30
ticoff.em ld error/warning messages 2018-02-26 10:51:12 +10:30
v850elf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
vanilla.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
vms.em ld error/warning messages 2018-02-26 10:51:12 +10:30
vxworks.em ld error/warning messages 2018-02-26 10:51:12 +10:30
xtensaelf.em ld error/warning messages 2018-02-26 10:51:12 +10:30
z80.em Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30

README

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are sourced by genscripts.sh, after
setting some variables to substitute in, to produce
C source files that contain jump tables for each emulation.

Copyright (C) 2012-2018 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.