From 03261851a10dd2d6900a0a00a7515a0a46fb5d76 Mon Sep 17 00:00:00 2001 From: Ranjith Kumaran Date: Fri, 17 Mar 2000 22:48:54 +0000 Subject: 20000317 sourceware import --- libgloss/m68k/sbc5204.ld | 127 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 libgloss/m68k/sbc5204.ld (limited to 'libgloss/m68k/sbc5204.ld') diff --git a/libgloss/m68k/sbc5204.ld b/libgloss/m68k/sbc5204.ld new file mode 100644 index 000000000..4570b0e18 --- /dev/null +++ b/libgloss/m68k/sbc5204.ld @@ -0,0 +1,127 @@ +/* STARTUP(crt0.o) */ +OUTPUT_ARCH(m68k) +/* Uncomment this if you want srecords. This is needed for a.out + * if you plan to use GDB. +OUTPUT_FORMAT(srec) + */ +SEARCH_DIR(.) +GROUP(-ldbug -lc -lgcc) +__DYNAMIC = 0; + +/* + * Setup the memory map of the Arnewsh SBC5204 + * stack grows down from high memory. + * + * The memory map look like this: + * +--------------------+ <- low memory + * | .text | + * | _etext | + * | ctor list | the ctor and dtor lists are for + * | dtor list | C++ support + * +--------------------+ + * | .data | initialized data goes here + * | _edata | + * +--------------------+ + * | .bss | + * | __bss_start | start of bss, cleared by crt0 + * | _end | start of heap, used by sbrk() + * +--------------------+ + * . . + * . . + * . . + * | __stack | top of stack + * +--------------------+ + */ +MEMORY +{ + ram (rwx) : ORIGIN = 0x10000, LENGTH = 0x30000 +} + +/* + * allocate the stack to be at the top of memory, since the stack + * grows down + */ + +PROVIDE (__stack = 0x30000); + +/* + * Initalize some symbols to be zero so we can reference them in the + * 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. + * This is so BSPs work better when using the crt0 installed with gcc. + * We have to initalize them twice, so we cover a.out (which prepends + * an underscore) and coff object file formats. + */ +PROVIDE (hardware_init_hook = 0); +PROVIDE (_hardware_init_hook = 0); +PROVIDE (software_init_hook = 0); +PROVIDE (_software_init_hook = 0); +/* + * stick everything in ram (of course) + */ +SECTIONS +{ + .text : + { + *(.text) + . = ALIGN(0x4); + __CTOR_LIST__ = .; + ___CTOR_LIST__ = .; + LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) + *(.ctors) + LONG(0) + __CTOR_END__ = .; + __DTOR_LIST__ = .; + ___DTOR_LIST__ = .; + LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) + *(.dtors) + LONG(0) + __DTOR_END__ = .; + *(.rodata) + *(.gcc_except_table) + + . = ALIGN(0x2); + __INIT_SECTION__ = . ; + LONG (0x4e560000) /* linkw %fp,#0 */ + *(.init) + SHORT (0x4e5e) /* unlk %fp */ + SHORT (0x4e75) /* rts */ + + __FINI_SECTION__ = . ; + LONG (0x4e560000) /* linkw %fp,#0 */ + *(.fini) + SHORT (0x4e5e) /* unlk %fp */ + SHORT (0x4e75) /* rts */ + + _etext = .; + *(.lit) + } > ram + + .data : + { + *(.shdata) + *(.data) + _edata = .; + } > ram + + .bss : + { + . = ALIGN(0x4); + __bss_start = . ; + *(.shbss) + *(.bss) + *(COMMON) + _end = ALIGN (0x8); + __end = _end; + } > ram + + .stab 0 (NOLOAD) : + { + *(.stab) + } + + .stabstr 0 (NOLOAD) : + { + *(.stabstr) + } +} -- cgit v1.2.3