diff options
-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 42c552b36ed..1eea4445e0d 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; |