summaryrefslogtreecommitdiff
path: root/ld/scripttempl/h8500.sc
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl/h8500.sc')
-rw-r--r--ld/scripttempl/h8500.sc59
1 files changed, 31 insertions, 28 deletions
diff --git a/ld/scripttempl/h8500.sc b/ld/scripttempl/h8500.sc
index d6a39eec38c..f6e88c61dfc 100644
--- a/ld/scripttempl/h8500.sc
+++ b/ld/scripttempl/h8500.sc
@@ -1,3 +1,11 @@
+TORS="
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -8,52 +16,47 @@ SECTIONS
{
.text ${RELOCATING+ 0x0000 } :
{
- *(.text)
-
- ${RELOCATING+ _etext = . ; }
+ *(.text)
+ ${RELOCATING+ _etext = . ; }
}
-
.data ${RELOCATING+ . } :
{
- *(.data)
- ${RELOCATING+ _edata = . ; }
+ *(.data)
+ ${RELOCATING+ _edata = . ; }
}
.rdata ${RELOCATING+ . } :
{
- *(.rdata);
+ *(.rdata);
*(.strings)
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
-}
+
+ ${CONSTRUCTING+${TORS}}
+ }
.bss ${RELOCATING+ . } :
{
- ${RELOCATING+ __start_bss = . ; }
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+ ${RELOCATING+ __start_bss = . ; }
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
}
.stack ${RELOCATING+ 0xfff0} :
{
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
}
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stab ]
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- [ .stabstr ]
- }
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
+ }
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
+ }
}
EOF