aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/h8500b.sc
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl/h8500b.sc')
-rw-r--r--ld/scripttempl/h8500b.sc18
1 files changed, 11 insertions, 7 deletions
diff --git a/ld/scripttempl/h8500b.sc b/ld/scripttempl/h8500b.sc
index ef5fa2c..a64eebc 100644
--- a/ld/scripttempl/h8500b.sc
+++ b/ld/scripttempl/h8500b.sc
@@ -1,3 +1,11 @@
+TORS="
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
@@ -24,13 +32,9 @@ SECTIONS
{
*(.rdata);
*(.strings)
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
-}
+
+ ${CONSTRUCTING+${TORS}}
+ }
.bss ${RELOCATING+ 0x40000} :
{