summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/ld/scripttempl/sh.sc
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/binutils/ld/scripttempl/sh.sc')
-rw-r--r--gnu/usr.bin/binutils/ld/scripttempl/sh.sc20
1 files changed, 11 insertions, 9 deletions
diff --git a/gnu/usr.bin/binutils/ld/scripttempl/sh.sc b/gnu/usr.bin/binutils/ld/scripttempl/sh.sc
index 45bd83b431e..036dd216db2 100644
--- a/gnu/usr.bin/binutils/ld/scripttempl/sh.sc
+++ b/gnu/usr.bin/binutils/ld/scripttempl/sh.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})
@@ -15,15 +25,7 @@ SECTIONS
*(.strings)
${RELOCATING+ _etext = . ; }
} ${RELOCATING+ > ram}
- .tors :
- {
- ___ctors = . ;
- *(.ctors)
- ___ctors_end = . ;
- ___dtors = . ;
- *(.dtors)
- ___dtors_end = . ;
- } ${RELOCATING+ > ram}
+ ${CONSTRUCTING+${TORS}}
.data :
{
*(.data)