aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/elf.sc
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl/elf.sc')
-rw-r--r--ld/scripttempl/elf.sc28
1 files changed, 25 insertions, 3 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 57a825b..58dc7b0 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -169,6 +169,20 @@ SECTIONS
.rel.got ${RELOCATING-0} : { *(.rel.got) }
.rela.got ${RELOCATING-0} : { *(.rela.got) }
${OTHER_GOT_RELOC_SECTIONS}
+ .rel.sdata ${RELOCATING-0} :
+ {
+ *(.rel.sdata)
+ ${RELOCATING+*(.rel.sdata.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.s*)}
+ }
+ .rela.sdata ${RELOCATING-0} :
+ {
+ *(.rela.sdata)
+ ${RELOCATING+*(.rela.sdata.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.s*)}
+ }
+ .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) }
+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
.rel.bss ${RELOCATING-0} : { *(.rel.bss) }
.rela.bss ${RELOCATING-0} : { *(.rela.bss) }
.rel.plt ${RELOCATING-0} : { *(.rel.plt) }
@@ -232,7 +246,13 @@ SECTIONS
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
- .sdata ${RELOCATING-0} : { *(.sdata) *(.sdata.*) *(.gnu.linkonce.s.*) }
+ .sdata ${RELOCATING-0} :
+ {
+ ${RELOCATING+${SDATA_START_SYMBOLS}}
+ *(.sdata)
+ ${RELOCATING+*(.sdata.*)}
+ ${RELOCATING+*(.gnu.linkonce.s.*)}
+ }
${RELOCATING+${OTHER_GOT_SECTIONS}}
${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
@@ -240,8 +260,10 @@ SECTIONS
${RELOCATING+${OTHER_BSS_SYMBOLS}}
.sbss ${RELOCATING-0} :
{
- *(.sbss) *(.scommon)
- ${RELOCATING+*(.sbss.*)}
+ *(.dynsbss)
+ *(.sbss)
+ ${RELOCATING+*(.sbss.*)}
+ *(.scommon)
}
.bss ${RELOCATING-0} :
{