diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2019-10-13 05:45:43 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2019-10-13 05:49:15 +0200 |
commit | 69ebdef7d579be102eb91f7eee49f29ad0dc5880 (patch) | |
tree | c7488d2f56c986f558a18e258107f80054b8b60d | |
parent | [no patch] Gentoo: Add patch tarball generation script (diff) | |
download | binutils-gdb-69ebdef7d579be102eb91f7eee49f29ad0dc5880.tar.gz binutils-gdb-69ebdef7d579be102eb91f7eee49f29ad0dc5880.tar.bz2 binutils-gdb-69ebdef7d579be102eb91f7eee49f29ad0dc5880.zip |
Gentoo: ld: enable new dtags by default for linux/gnu targetsgentoo/binutils-2.33.1-1
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.
(cherry picked from commit 3ed91ee23d7ba05bffe6fb00bdaf5fa089643d77)
-rw-r--r-- | ld/emultempl/elf32.em | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 52db0fde1df..194dd18fe37 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -103,6 +103,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; |