binutils-gdb/ld/scripttempl/w65.sc

66 lines
819 B
Python
Raw Normal View History

TORS=".tors :
{
___ctors = . ;
*(.ctors)
___ctors_end = . ;
___dtors = . ;
*(.dtors)
___dtors_end = . ;
} > ram"
1999-05-03 09:29:11 +02:00
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
MEMORY
{
1999-05-03 09:29:11 +02:00
ram : o = 0x1000, l = 512k
}
1999-05-03 09:29:11 +02:00
SECTIONS
{
.text :
{
*(.text)
*(.strings)
${RELOCATING+ _etext = . ; }
1999-05-03 09:29:11 +02:00
} ${RELOCATING+ > ram}
${CONSTRUCTING+${TORS}}
1999-05-03 09:29:11 +02:00
.data :
{
*(.data)
${RELOCATING+ _edata = . ; }
1999-05-03 09:29:11 +02:00
} ${RELOCATING+ > ram}
1999-05-03 09:29:11 +02:00
.bss :
{
${RELOCATING+ _bss_start = . ; }
*(.bss)
*(COMMON)
${RELOCATING+ _end = . ; }
1999-05-03 09:29:11 +02:00
} ${RELOCATING+ >ram}
.stack ${RELOCATING+ 0x30000 } :
1999-05-03 09:29:11 +02:00
{
${RELOCATING+ _stack = . ; }
*(.stack)
1999-05-03 09:29:11 +02:00
} ${RELOCATING+ > ram}
.stab . (NOLOAD) :
{
[ .stab ]
}
.stabstr . (NOLOAD) :
{
[ .stabstr ]
}
1999-05-03 09:29:11 +02:00
}
EOF