aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/.Sanitize2
-rw-r--r--ld/scripttempl/i386pe.sc2
-rw-r--r--ld/scripttempl/z8000.sc (renamed from ld/scripttempl/z8ksim.sc)12
3 files changed, 9 insertions, 7 deletions
diff --git a/ld/scripttempl/.Sanitize b/ld/scripttempl/.Sanitize
index 8e97c30..0cb1172 100644
--- a/ld/scripttempl/.Sanitize
+++ b/ld/scripttempl/.Sanitize
@@ -69,7 +69,7 @@ sparclynx.sc
st2000.sc
vanilla.sc
w65.sc
-z8ksim.sc
+z8000.sc
Things-to-lose:
diff --git a/ld/scripttempl/i386pe.sc b/ld/scripttempl/i386pe.sc
index 8923ad7..4219736 100644
--- a/ld/scripttempl/i386pe.sc
+++ b/ld/scripttempl/i386pe.sc
@@ -16,6 +16,8 @@ SECTIONS
{
${RELOCATING+ *(.init);}
*(.text)
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; LONG (-1); *(.ctor); LONG (0); }
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; LONG (-1); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini);}
${RELOCATING+ etext = .};
}
diff --git a/ld/scripttempl/z8ksim.sc b/ld/scripttempl/z8000.sc
index e9627d8..2b87930 100644
--- a/ld/scripttempl/z8ksim.sc
+++ b/ld/scripttempl/z8000.sc
@@ -1,17 +1,17 @@
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
-OUTPUT_ARCH(z8002)
+OUTPUT_ARCH("${OUTPUT_ARCH}")
ENTRY(_start)
SECTIONS
{
-.text : {
+.text ${BIG+ ${RELOCATING+ 0x0000000}} : {
*(.text)
*(.strings)
*(.rdata)
}
-.ctors :
+.ctors ${BIG+ ${RELOCATING+ 0x2000000}} :
{
${RELOCATING+ ___ctors = . ; }
*(.ctors);
@@ -21,11 +21,11 @@ SECTIONS
${RELOCATING+ ___dtors_end = . ; }
}
-.data : {
+.data ${BIG+ ${RELOCATING+ 0x3000000}} : {
*(.data)
}
-.bss :
+.bss ${BIG+ ${RELOCATING+ 0x4000000}} :
{
${RELOCATING+ __start_bss = . ; }
*(.bss);
@@ -33,7 +33,7 @@ SECTIONS
${RELOCATING+ __end_bss = . ; }
}
-.heap : {
+.heap ${BIG+ ${RELOCATING+ 0x5000000}} : {
${RELOCATING+ __start_heap = . ; }
${RELOCATING+ . = . + 20k ; }
${RELOCATING+ __end_heap = . ; }