STARTUP(crt0.o)
|
STARTUP(crt0.o)
|
OUTPUT_ARCH(m68k)
|
OUTPUT_ARCH(m68k)
|
/* Uncomment this if you want srecords. This is needed for a.out
|
/* Uncomment this if you want srecords. This is needed for a.out
|
* if you plan to use GDB.
|
* if you plan to use GDB.
|
OUTPUT_FORMAT(srec)
|
OUTPUT_FORMAT(srec)
|
*/
|
*/
|
SEARCH_DIR(.)
|
SEARCH_DIR(.)
|
GROUP(-lmvme135 -lc -lgcc)
|
GROUP(-lmvme135 -lc -lgcc)
|
__DYNAMIC = 0;
|
__DYNAMIC = 0;
|
|
|
/*
|
/*
|
* Setup the memory map of the Motorola MVME135 Board
|
* Setup the memory map of the Motorola MVME135 Board
|
* stack grows down from high memory.
|
* stack grows down from high memory.
|
*
|
*
|
* The memory map look like this:
|
* The memory map look like this:
|
* +--------------------+ <- low memory
|
* +--------------------+ <- low memory
|
* | .text |
|
* | .text |
|
* | _etext |
|
* | _etext |
|
* | ctor list | the ctor and dtor lists are for
|
* | ctor list | the ctor and dtor lists are for
|
* | dtor list | C++ support
|
* | dtor list | C++ support
|
* +--------------------+
|
* +--------------------+
|
* | .data | initialized data goes here
|
* | .data | initialized data goes here
|
* | _edata |
|
* | _edata |
|
* +--------------------+
|
* +--------------------+
|
* | .bss |
|
* | .bss |
|
* | __bss_start | start of bss, cleared by crt0
|
* | __bss_start | start of bss, cleared by crt0
|
* | _end | start of heap, used by sbrk()
|
* | _end | start of heap, used by sbrk()
|
* +--------------------+
|
* +--------------------+
|
* . .
|
* . .
|
* . .
|
* . .
|
* . .
|
* . .
|
* | __stack | top of stack
|
* | __stack | top of stack
|
* +--------------------+
|
* +--------------------+
|
*/
|
*/
|
|
|
MEMORY
|
MEMORY
|
{
|
{
|
ram (rwx) : ORIGIN = 0x5000, LENGTH = 1M
|
ram (rwx) : ORIGIN = 0x5000, LENGTH = 1M
|
}
|
}
|
|
|
/*
|
/*
|
* Allocate the stack to be at the top of memory, since the stack
|
* Allocate the stack to be at the top of memory, since the stack
|
* grows down
|
* grows down
|
*/
|
*/
|
|
|
PROVIDE (__stack = 1M - 8);
|
PROVIDE (__stack = 1M - 8);
|
|
|
/*
|
/*
|
* Initalize some symbols to be zero so we can reference them in the
|
* Initalize some symbols to be zero so we can reference them in the
|
* crt0 without core dumping. These functions are all optional, but
|
* crt0 without core dumping. These functions are all optional, but
|
* we do this so we can have our crt0 always use them if they exist.
|
* we do this so we can have our crt0 always use them if they exist.
|
* This is so BSPs work better when using the crt0 installed gcc.
|
* This is so BSPs work better when using the crt0 installed gcc.
|
* We have to initalize them twice, so we cover a.out (which prepends
|
* We have to initalize them twice, so we cover a.out (which prepends
|
* an underscore) and coff object file formats.
|
* an underscore) and coff object file formats.
|
*/
|
*/
|
PROVIDE (hardware_init_hook = 0);
|
PROVIDE (hardware_init_hook = 0);
|
PROVIDE (_hardware_init_hook = 0);
|
PROVIDE (_hardware_init_hook = 0);
|
PROVIDE (software_init_hook = 0);
|
PROVIDE (software_init_hook = 0);
|
PROVIDE (_software_init_hook = 0);
|
PROVIDE (_software_init_hook = 0);
|
/*
|
/*
|
* stick everything in ram (of course)
|
* stick everything in ram (of course)
|
*/
|
*/
|
SECTIONS
|
SECTIONS
|
{
|
{
|
.text :
|
.text :
|
{
|
{
|
*(.text)
|
*(.text)
|
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
__CTOR_LIST__ = .;
|
__CTOR_LIST__ = .;
|
___CTOR_LIST__ = .;
|
___CTOR_LIST__ = .;
|
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
|
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
|
*(.ctors)
|
*(.ctors)
|
LONG(0)
|
LONG(0)
|
__CTOR_END__ = .;
|
__CTOR_END__ = .;
|
__DTOR_LIST__ = .;
|
__DTOR_LIST__ = .;
|
___DTOR_LIST__ = .;
|
___DTOR_LIST__ = .;
|
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
|
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
|
*(.dtors)
|
*(.dtors)
|
LONG(0)
|
LONG(0)
|
__DTOR_END__ = .;
|
__DTOR_END__ = .;
|
*(.rodata)
|
*(.rodata)
|
*(.gcc_except_table)
|
*(.gcc_except_table)
|
|
|
. = ALIGN(0x2);
|
. = ALIGN(0x2);
|
__INIT_SECTION__ = . ;
|
__INIT_SECTION__ = . ;
|
LONG (0x4e560000) /* linkw %fp,#0 */
|
LONG (0x4e560000) /* linkw %fp,#0 */
|
*(.init)
|
*(.init)
|
SHORT (0x4e5e) /* unlk %fp */
|
SHORT (0x4e5e) /* unlk %fp */
|
SHORT (0x4e75) /* rts */
|
SHORT (0x4e75) /* rts */
|
|
|
__FINI_SECTION__ = . ;
|
__FINI_SECTION__ = . ;
|
LONG (0x4e560000) /* linkw %fp,#0 */
|
LONG (0x4e560000) /* linkw %fp,#0 */
|
*(.fini)
|
*(.fini)
|
SHORT (0x4e5e) /* unlk %fp */
|
SHORT (0x4e5e) /* unlk %fp */
|
SHORT (0x4e75) /* rts */
|
SHORT (0x4e75) /* rts */
|
|
|
_etext = .;
|
_etext = .;
|
*(.lit)
|
*(.lit)
|
} > ram
|
} > ram
|
|
|
.data :
|
.data :
|
{
|
{
|
*(.shdata)
|
*(.shdata)
|
*(.data)
|
*(.data)
|
_edata = .;
|
_edata = .;
|
} > ram
|
} > ram
|
|
|
.bss :
|
.bss :
|
{
|
{
|
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
__bss_start = . ;
|
__bss_start = . ;
|
*(.shbss)
|
*(.shbss)
|
*(.bss)
|
*(.bss)
|
*(COMMON)
|
*(COMMON)
|
_end = ALIGN (0x8);
|
_end = ALIGN (0x8);
|
__end = _end;
|
__end = _end;
|
} > ram
|
} > ram
|
|
|
.stab 0 (NOLOAD) :
|
.stab 0 (NOLOAD) :
|
{
|
{
|
*(.stab)
|
*(.stab)
|
}
|
}
|
|
|
.stabstr 0 (NOLOAD) :
|
.stabstr 0 (NOLOAD) :
|
{
|
{
|
*(.stabstr)
|
*(.stabstr)
|
}
|
}
|
}
|
}
|
|
|