]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - ld/configure
ld: Add a linker configure option --enable-relro
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 22 Jun 2016 12:37:24 +0000 (05:37 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 22 Jun 2016 12:37:38 +0000 (05:37 -0700)
commit647e4d46495f2bfb0950fd1066c8a660173cca40
treeaa635b99d89cedde44d81afb3b110187bf05cb6f
parent6edaf4d75b45ff08d7296095506904663b8f0576
ld: Add a linker configure option --enable-relro

Add a configure option --enable-relro to decide whether -z relro should
be enabled in ELF linker by default.  Default to yes for all Linux
targets, except FRV, HPPA, IA64 and MIPS, since many relro tests fail
on these targets.

PR ld/20283
* NEWS: Mention --enable-relro.
* configure.ac: Add --enable-relro.
(DEFAULT_LD_Z_RELRO): New.  Set by --enable-relro.
* configure.tgt (ac_default_ld_z_relro): Default it to 1 for
some Linux targets.
* config.in: Regenerated.
* configure: Likewise.
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
link_info.relro to DEFAULT_LD_Z_RELRO.
* testsuite/config/default.exp (ld_elf_shared_opt): New.
* testsuite/lib/ld-lib.exp (run_dump_test): Pass
$ld_elf_shared_opt to ld for ELF targets with shared object
support.
(run_ld_link_tests): Likewise.
ld/ChangeLog
ld/NEWS
ld/config.in
ld/configure
ld/configure.ac
ld/configure.tgt
ld/emultempl/elf32.em
ld/testsuite/config/default.exp
ld/testsuite/lib/ld-lib.exp