summaryrefslogtreecommitdiff
path: root/ld/scripttempl/h8300.sc
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl/h8300.sc')
-rw-r--r--ld/scripttempl/h8300.sc90
1 files changed, 54 insertions, 36 deletions
diff --git a/ld/scripttempl/h8300.sc b/ld/scripttempl/h8300.sc
index f2f876e283..6f4cdcec4b 100644
--- a/ld/scripttempl/h8300.sc
+++ b/ld/scripttempl/h8300.sc
@@ -1,3 +1,13 @@
+TORS=".tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -18,52 +28,60 @@ MEMORY
SECTIONS
{
-.vectors : {
- /* Use something like this to place a specific function's address
- into the vector table.
+.vectors :
+ {
+ /* Use something like this to place a specific
+ function's address into the vector table.
- SHORT(ABSOLUTE(_foobar)) */
+ SHORT (ABSOLUTE (_foobar)). */
- *(.vectors)
+ *(.vectors)
} ${RELOCATING+ > vectors}
-.text : {
- *(.rodata)
- *(.text)
- *(.strings)
- ${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
-.tors : {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
+.text :
+ {
+ *(.rodata)
+ *(.text)
+ *(.strings)
+ ${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
-.data : {
- *(.data)
- *(.tiny)
- ${RELOCATING+ _edata = . ; }
+
+ ${CONSTRUCTING+${TORS}}
+
+.data :
+ {
+ *(.data)
+ *(.tiny)
+ ${RELOCATING+ _edata = . ; }
} ${RELOCATING+ > ram}
-.bss : {
- ${RELOCATING+ _bss_start = . ;}
- *(.bss)
- *(COMMON)
- ${RELOCATING+ _end = . ; }
+
+.bss :
+ {
+ ${RELOCATING+ _bss_start = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+ _end = . ; }
} ${RELOCATING+ >ram}
-.stack : {
- ${RELOCATING+ _stack = . ; }
- *(.stack)
+
+.stack :
+ {
+ ${RELOCATING+ _stack = . ; }
+ *(.stack)
} ${RELOCATING+ > topram}
-.eight : {
- *(.eight)
+
+.eight :
+ {
+ *(.eight)
} ${RELOCATING+ > eight}
-.stab 0 ${RELOCATING+(NOLOAD)} : {
- [ .stab ]
+
+.stab 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stab ]
}
-.stabstr 0 ${RELOCATING+(NOLOAD)} : {
- [ .stabstr ]
+
+.stabstr 0 ${RELOCATING+(NOLOAD)} :
+ {
+ [ .stabstr ]
}
}
EOF