summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-08-19 09:27:52 +0100
committerAndrey Drobyshev <a.drobyshev@partner.samsung.com>2018-10-23 16:58:05 +0300
commit12f75b84506d7820209fc3a919eac9d7991efd74 (patch)
tree8b6087f1c48a97e688859842e9a54003966f38f1
parenta6eb3329ea30667394508b8f6703aea98d87c67b (diff)
downloadbinutils-12f75b84506d7820209fc3a919eac9d7991efd74.tar.gz
binutils-12f75b84506d7820209fc3a919eac9d7991efd74.tar.bz2
binutils-12f75b84506d7820209fc3a919eac9d7991efd74.zip
Enable relro by default for AArch64, ARM and SCORE.submit/tizen_base/20181026.090949accepted/tizen/base/20181102.125631
ld * emultempl/aarch64elf.em (before_parse): Initialise the relro field in the link_info structure. * emultempl/armelf.em (before_parse): Likewise. * emultempl/linux.em (before_parse): Likewise. * emultempl/scoreelf.em (before_parse): Likewise. Backported from upstream 576438f. Signed-off-by: Andrey Drobyshev <a.drobyshev@partner.samsung.com> Change-Id: I37738901650b0d254316bbbd8938beebd12418d1
-rw-r--r--ld/ChangeLog8
-rw-r--r--ld/emultempl/aarch64elf.em1
-rw-r--r--ld/emultempl/armelf.em1
-rw-r--r--ld/emultempl/linux.em1
-rw-r--r--ld/emultempl/scoreelf.em1
5 files changed, 12 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 21305c3ab2e..f9ba9c153a0 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -9,6 +9,14 @@
* testsuite/ld-x86-64/pr20830.s: Likewise.
+2016-08-19 Nick Clifton <nickc@redhat.com>
+
+ * emultempl/aarch64elf.em (before_parse): Initialise the relro
+ field in the link_info structure.
+ * emultempl/armelf.em (before_parse): Likewise.
+ * emultempl/linux.em (before_parse): Likewise.
+ * emultempl/scoreelf.em (before_parse): Likewise.
+
2016-08-03 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
diff --git a/ld/emultempl/aarch64elf.em b/ld/emultempl/aarch64elf.em
index a17553a6a59..9f2c349923a 100644
--- a/ld/emultempl/aarch64elf.em
+++ b/ld/emultempl/aarch64elf.em
@@ -43,6 +43,7 @@ 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`;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
}
static void
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 6074824f72d..03e8fe93d60 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -52,6 +52,7 @@ 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`;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
}
static void
diff --git a/ld/emultempl/linux.em b/ld/emultempl/linux.em
index c28e9785b46..64a9130cac3 100644
--- a/ld/emultempl/linux.em
+++ b/ld/emultempl/linux.em
@@ -50,6 +50,7 @@ gld${EMULATION_NAME}_before_parse (void)
ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
input_flags.dynamic = TRUE;
config.has_shared = TRUE;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
}
/* Try to open a dynamic archive. This is where we know that Linux
diff --git a/ld/emultempl/scoreelf.em b/ld/emultempl/scoreelf.em
index 6433365f662..7df7f5f68db 100644
--- a/ld/emultempl/scoreelf.em
+++ b/ld/emultempl/scoreelf.em
@@ -39,6 +39,7 @@ 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`;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
}
static void