aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-01-20 17:11:21 +1030
committerAlan Modra <amodra@gmail.com>2015-01-20 19:48:54 +1030
commit3e2b0f3116a46c8a9a6ffbcb5ae4847b6601467a (patch)
tree37d5ef4aa1fb3e6f3f47468be1f9ef21905b30f8 /ld/scripttempl
parent03d5b77300e7f62ba87fb4cd82d4aed83f9a3cd2 (diff)
downloadgdb-3e2b0f3116a46c8a9a6ffbcb5ae4847b6601467a.zip
gdb-3e2b0f3116a46c8a9a6ffbcb5ae4847b6601467a.tar.gz
gdb-3e2b0f3116a46c8a9a6ffbcb5ae4847b6601467a.tar.bz2
Reorder powerpc64 sections for -z relro
More sections can be read-only after relocation. .opd is an obvious candidate. * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Move .opd to.. (OTHER_RELRO_SECTIONS_2): ..here, new define. * scripttempl/elf.sc: Add OTHER_RELRO_SECTIONS_2.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf.sc2
1 files changed, 2 insertions, 0 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index b3d95d0..07b0395 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -20,6 +20,7 @@
# (e.g., .PARISC.global)
# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
# (e.g. PPC32 .fixup, .got[12])
+# OTHER_RELRO_SECTIONS_2 - as above, but after .dynamic in text segment
# OTHER_BSS_SECTIONS - other than .bss .sbss ...
# ATTRS_SECTIONS - at the end
# OTHER_SECTIONS - at the end
@@ -572,6 +573,7 @@ cat <<EOF
${RELOCATING+${DATARELRO}}
${OTHER_RELRO_SECTIONS}
${TEXT_DYNAMIC-${DYNAMIC}}
+ ${OTHER_RELRO_SECTIONS_2}
${DATA_GOT+${RELRO_NOW+${GOT}}}
${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}