diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2019-10-13 05:25:28 +0200 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-11-18 23:23:18 +0000 |
commit | f8f4fabf65ee3a150635a1f6329bc4d55be5ebe0 (patch) | |
tree | 75dd5d2f98855b627a1a95c72bdcd4bc2f859e9d | |
parent | [no patch] Gentoo: Add patch tarball generation script (diff) | |
download | binutils-gdb-gentoo/binutils-9999-5.tar.gz binutils-gdb-gentoo/binutils-9999-5.tar.bz2 binutils-gdb-gentoo/binutils-9999-5.zip |
Gentoo: ld: enable new dtags by default for linux/gnu targetsgentoo/binutils-9999-5
Original author: Mike Frysinger <vapier@gentoo.org>
The "new" dtags options have been around for 14+ years now, so for Linux
and GNU targets, enable them by default.
2012-01-21 Mike Frysinger <vapier@gentoo.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
link_info.new_dtags to TRUE for linux/gnu targets.
* NEWS: Mention new dtags default.
2013-01-22 Roland McGrath <mcgrathr@google.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
new_dtags to TRUE for *-*-nacl* targets.
-rw-r--r-- | ld/emultempl/elf.em | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em index dcd9523900c..13dce2ba236 100644 --- a/ld/emultempl/elf.em +++ b/ld/emultempl/elf.em @@ -81,6 +81,16 @@ gld${EMULATION_NAME}_before_parse (void) input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; +EOF + +case ${target} in + *-*-linux-* | *-*-k*bsd*-* | *-*-gnu* | *-*-nacl*) + fragment <<EOF + link_info.new_dtags = TRUE; +EOF + ;; +esac +fragment <<EOF link_info.check_relocs_after_open_input = TRUE; link_info.relro = DEFAULT_LD_Z_RELRO; link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE; |