aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/ChangeLog10
-rw-r--r--ld/emulparams/elf64ppc.sh9
-rw-r--r--ld/scripttempl/elf.sc3
3 files changed, 16 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 4641ff0..5a97e32 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -7,6 +7,16 @@
2015-01-20 Alan Modra <amodra@gmail.com>
+ * emulparams/elf64ppc.sh (OTHER_SDATA_SECTIONS): Use in place of..
+ (OTHER_BSS_SYMBOLS): ..this.
+ (OTHER_PLT_RELOC_SECTIONS): Don't define.
+ (OTHER_GOT_RELOC_SECTIONS): Add rela.toc1 and rela.tocbss.
+ (OTHER_READWRITE_SECTIONS): Don't define. Move .toc1 to..
+ (OTHER_RELRO_SECTIONS_2): ..here.
+ * scripttempl/elf.sc: Move SBSS too when DATA_SDATA.
+
+2015-01-20 Alan Modra <amodra@gmail.com>
+
* emulparams/elf64ppc.sh (BSS_PLT): Don't define.
(OTHER_READWRITE_SECTIONS): Move .branch_lt to..
(OTHER_RELRO_SECTIONS_2): ..here.
diff --git a/ld/emulparams/elf64ppc.sh b/ld/emulparams/elf64ppc.sh
index 89fc699..b805dbe 100644
--- a/ld/emulparams/elf64ppc.sh
+++ b/ld/emulparams/elf64ppc.sh
@@ -15,10 +15,8 @@ unset SBSS_END_SYMBOLS
unset OTHER_END_SYMBOLS
unset OTHER_RELRO_SECTIONS
OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
-OTHER_BSS_SYMBOLS="
+OTHER_SDATA_SECTIONS="
.tocbss ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.tocbss)}"
-OTHER_PLT_RELOC_SECTIONS="
- .rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }"
if test x${RELOCATING+set} = xset; then
GOT="
@@ -33,11 +31,12 @@ INITIAL_RELOC_SECTIONS="
.rela.opd ${RELOCATING-0} : { *(.rela.opd) }"
OTHER_GOT_RELOC_SECTIONS="
.rela.toc ${RELOCATING-0} : { *(.rela.toc) }
+ .rela.toc1 ${RELOCATING-0} : { *(.rela.toc1) }
+ .rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }
.rela.branch_lt ${RELOCATING-0} : { *(.rela.branch_lt) }"
-OTHER_READWRITE_SECTIONS="
- .toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }"
OTHER_RELRO_SECTIONS_2="
.opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }
+ .toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
.branch_lt ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }"
# Put .got before .data
DATA_GOT=" "
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index eb3312a..c9c80b0 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -582,6 +582,7 @@ cat <<EOF
${INITIAL_READWRITE_SECTIONS}
${DATA_SDATA+${SDATA}}
${DATA_SDATA+${OTHER_SDATA_SECTIONS}}
+ ${DATA_SDATA+${SBSS}}
${DATA_GOT+${RELRO_NOW-${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}}}
${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
@@ -609,7 +610,7 @@ cat <<EOF
${RELOCATING+. = .;}
${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
- ${SBSS}
+ ${DATA_SDATA-${SBSS}}
${BSS_PLT+${PLT}}
.${BSS_NAME} ${RELOCATING-0} :
{