diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-02-27 11:34:20 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-02-27 11:34:29 -0800 |
commit | f6aec96dce1ddbd8961a3aa8a2925db2021719bb (patch) | |
tree | 0837083a3f8011754f0fa415afa4a6fb27795580 /bfd/ChangeLog | |
parent | 55089490f79ce1ddb9610fd6abeeaf896825fb71 (diff) | |
download | gdb-f6aec96dce1ddbd8961a3aa8a2925db2021719bb.zip gdb-f6aec96dce1ddbd8961a3aa8a2925db2021719bb.tar.gz gdb-f6aec96dce1ddbd8961a3aa8a2925db2021719bb.tar.bz2 |
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.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5c2a888..59f7c9c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2018-02-27 H.J. Lu <hongjiu.lu@intel.com> + + * 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. + 2018-02-27 Nick Clifton <nickc@redhat.com> * aout-cris.c (swap_ext_reloc_out): Standadize error/warning |