From 3e2b0f3116a46c8a9a6ffbcb5ae4847b6601467a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 20 Jan 2015 17:11:21 +1030 Subject: 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. --- ld/scripttempl/elf.sc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ld/scripttempl') 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 <