/* Linker script, for H8/3052 on AKI-LAN target */
OUTPUT_FORMAT("coff-h8300")
OUTPUT_ARCH(h8300h)
ENTRY("_start")
MEMORY
{
/* 0xc4 is a magic entry. We should have the linker just
skip over it one day... */
vectors : o = 0x0000, l = 0xc4
magicvectors : o = 0xc4, l = 0x3c
/* Internal ROM area */
rom : o = 0x000100, l = 0x7feff
/* External RAM area (128KB on CS1) */
ram : o = 0x220000, l = 0x1ffff
/*ram : o = 0xffdf10, l = 0x1fff*/
/* Internal RAM for stack */
stack : o = 0xffdf10, l = 0x1fff
/* The stack starts at the top of internal ram. */
topstack : o = 0xffff0c, l = 0x4
/* This holds variables in the "tiny" sections. */
tiny : o = 0xff8000, l = 0x7f00
/* At the very top of the address space is the 8-bit area. */
eight : o = 0xffff00, l = 0x100
}
SECTIONS
{
.vectors :
{
/* Use something like this to place a specific
function's address into the vector table.
LONG (ABSOLUTE (_foobar)). */
*(.vectors)
} > vectors
.text :
{
_text_start = . ;
*(.rodata)
*(.text)
*(.strings)
_text_end = . ;
} > rom
.data : AT (_text_end)
{
_data_start = . ;
*(.data)
_data_end = . ;
} > ram
.bss :
{
_bss_start = . ;
*(.bss)
*(COMMON)
_bss_end = . ;
} >ram
.stack :
{
_stack = . ;
*(.stack)
} > topstack
.tiny :
{
*(.tiny)
} > tiny
.eight :
{
*(.eight)
} > eight
.stab 0 (NOLOAD) :
{
[ .stab ]
}
.stabstr 0 (NOLOAD) :
{
[ .stabstr ]
}
}