TORS=".tors :
|
TORS=".tors :
|
{
|
{
|
___ctors = . ;
|
___ctors = . ;
|
*(.ctors)
|
*(.ctors)
|
___ctors_end = . ;
|
___ctors_end = . ;
|
___dtors = . ;
|
___dtors = . ;
|
*(.dtors)
|
*(.dtors)
|
___dtors_end = . ;
|
___dtors_end = . ;
|
} > ram"
|
} > ram"
|
|
|
cat <
|
cat <
|
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
|
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
|
OUTPUT_ARCH(h8300h)
|
OUTPUT_ARCH(h8300h)
|
ENTRY("_start")
|
ENTRY("_start")
|
|
|
/* The memory size is 256KB to coincide with the simulator.
|
/* The memory size is 256KB to coincide with the simulator.
|
Don't change either without considering the other. */
|
Don't change either without considering the other. */
|
|
|
MEMORY
|
MEMORY
|
{
|
{
|
/* 0xc4 is a magic entry. We should have the linker just
|
/* 0xc4 is a magic entry. We should have the linker just
|
skip over it one day... */
|
skip over it one day... */
|
vectors : o = 0x0000, l = 0xc4
|
vectors : o = 0x0000, l = 0xc4
|
magicvectors : o = 0xc4, l = 0x3c
|
magicvectors : o = 0xc4, l = 0x3c
|
/* We still only use 256k as the main ram size. */
|
/* We still only use 256k as the main ram size. */
|
ram : o = 0x0100, l = 0x3fefc
|
ram : o = 0x0100, l = 0x3fefc
|
/* The stack starts at the top of main ram. */
|
/* The stack starts at the top of main ram. */
|
topram : o = 0x3fffc, l = 0x4
|
topram : o = 0x3fffc, l = 0x4
|
/* This holds variables in the "tiny" sections. */
|
/* This holds variables in the "tiny" sections. */
|
tiny : o = 0xff8000, l = 0x7f00
|
tiny : o = 0xff8000, l = 0x7f00
|
/* At the very top of the address space is the 8-bit area. */
|
/* At the very top of the address space is the 8-bit area. */
|
eight : o = 0xffff00, l = 0x100
|
eight : o = 0xffff00, l = 0x100
|
}
|
}
|
|
|
SECTIONS
|
SECTIONS
|
{
|
{
|
.vectors :
|
.vectors :
|
{
|
{
|
/* Use something like this to place a specific
|
/* Use something like this to place a specific
|
function's address into the vector table.
|
function's address into the vector table.
|
|
|
LONG (ABSOLUTE (_foobar)). */
|
LONG (ABSOLUTE (_foobar)). */
|
|
|
*(.vectors)
|
*(.vectors)
|
} ${RELOCATING+ > vectors}
|
} ${RELOCATING+ > vectors}
|
|
|
.text :
|
.text :
|
{
|
{
|
*(.rodata)
|
*(.rodata)
|
*(.text)
|
*(.text)
|
*(.strings)
|
*(.strings)
|
${RELOCATING+ _etext = . ; }
|
${RELOCATING+ _etext = . ; }
|
} ${RELOCATING+ > ram}
|
} ${RELOCATING+ > ram}
|
|
|
${CONSTRUCTING+${TORS}}
|
${CONSTRUCTING+${TORS}}
|
|
|
.data :
|
.data :
|
{
|
{
|
*(.data)
|
*(.data)
|
${RELOCATING+ _edata = . ; }
|
${RELOCATING+ _edata = . ; }
|
} ${RELOCATING+ > ram}
|
} ${RELOCATING+ > ram}
|
|
|
.bss :
|
.bss :
|
{
|
{
|
${RELOCATING+ _bss_start = . ;}
|
${RELOCATING+ _bss_start = . ;}
|
*(.bss)
|
*(.bss)
|
*(COMMON)
|
*(COMMON)
|
${RELOCATING+ _end = . ; }
|
${RELOCATING+ _end = . ; }
|
} ${RELOCATING+ >ram}
|
} ${RELOCATING+ >ram}
|
|
|
.stack :
|
.stack :
|
{
|
{
|
${RELOCATING+ _stack = . ; }
|
${RELOCATING+ _stack = . ; }
|
*(.stack)
|
*(.stack)
|
} ${RELOCATING+ > topram}
|
} ${RELOCATING+ > topram}
|
|
|
.tiny :
|
.tiny :
|
{
|
{
|
*(.tiny)
|
*(.tiny)
|
} ${RELOCATING+ > tiny}
|
} ${RELOCATING+ > tiny}
|
|
|
.eight :
|
.eight :
|
{
|
{
|
*(.eight)
|
*(.eight)
|
} ${RELOCATING+ > eight}
|
} ${RELOCATING+ > eight}
|
|
|
.stab 0 ${RELOCATING+(NOLOAD)} :
|
.stab 0 ${RELOCATING+(NOLOAD)} :
|
{
|
{
|
[ .stab ]
|
[ .stab ]
|
}
|
}
|
|
|
.stabstr 0 ${RELOCATING+(NOLOAD)} :
|
.stabstr 0 ${RELOCATING+(NOLOAD)} :
|
{
|
{
|
[ .stabstr ]
|
[ .stabstr ]
|
}
|
}
|
}
|
}
|
EOF
|
EOF
|
|
|