aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf.sc44
1 files changed, 24 insertions, 20 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index afb4ac6..3ffd3e1 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -115,6 +115,9 @@ SECTIONS
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
.gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
.gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
+
+ .rel.init ${RELOCATING-0} : { *(.rel.init) }
+ .rela.init ${RELOCATING-0} : { *(.rela.init) }
.rel.text ${RELOCATING-0} :
{
*(.rel.text)
@@ -127,18 +130,8 @@ SECTIONS
${RELOCATING+*(.rela.text.*)}
${RELOCATING+*(.rela.gnu.linkonce.t*)}
}
- .rel.data ${RELOCATING-0} :
- {
- *(.rel.data)
- ${RELOCATING+*(.rel.data.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.d*)}
- }
- .rela.data ${RELOCATING-0} :
- {
- *(.rela.data)
- ${RELOCATING+*(.rela.data.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.d*)}
- }
+ .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
+ .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
.rel.rodata ${RELOCATING-0} :
{
*(.rel.rodata)
@@ -151,20 +144,31 @@ SECTIONS
${RELOCATING+*(.rela.rodata.*)}
${RELOCATING+*(.rela.gnu.linkonce.r*)}
}
- .rel.got ${RELOCATING-0} : { *(.rel.got) }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ ${OTHER_READONLY_RELOC_SECTIONS}
+ .rel.data ${RELOCATING-0} :
+ {
+ *(.rel.data)
+ ${RELOCATING+*(.rel.data.*)}
+ ${RELOCATING+*(.rel.gnu.linkonce.d*)}
+ }
+ .rela.data ${RELOCATING-0} :
+ {
+ *(.rela.data)
+ ${RELOCATING+*(.rela.data.*)}
+ ${RELOCATING+*(.rela.gnu.linkonce.d*)}
+ }
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
.rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
.rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
.rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
- .rel.init ${RELOCATING-0} : { *(.rel.init) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
- .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
+ .rel.got ${RELOCATING-0} : { *(.rel.got) }
+ .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ ${OTHER_GOT_RELOC_SECTIONS}
.rel.bss ${RELOCATING-0} : { *(.rel.bss) }
.rela.bss ${RELOCATING-0} : { *(.rela.bss) }
.rel.plt ${RELOCATING-0} : { *(.rel.plt) }
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
+
.init ${RELOCATING-0} : { KEEP (*(.init)) } =${NOP-0}
${DATA_PLT-${PLT}}
.text ${RELOCATING-0} :
@@ -214,7 +218,7 @@ SECTIONS
we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} : { *(.sdata) *(.sdata.*) }
${RELOCATING+${OTHER_GOT_SECTIONS}}
- ${RELOCATING+_edata = .;}
+ ${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
@@ -230,7 +234,7 @@ SECTIONS
${RELOCATING+. = ALIGN(${ALIGNMENT});}
}
${RELOCATING+. = ALIGN(${ALIGNMENT});}
- ${RELOCATING+_end = . ;}
+ ${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
${RELOCATING+PROVIDE (end = .);}