From 996a9cb4e2a7d2d9ae43b8e3eb531a81ccefe690 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 1 May 1996 15:25:33 +0000 Subject: Updates from Eric Norum. --- c/src/lib/libbsp/m68k/gen68360/startup/linkcmds | 125 +++++++++++++----------- 1 file changed, 67 insertions(+), 58 deletions(-) (limited to 'c/src/lib/libbsp/m68k/gen68360/startup/linkcmds') diff --git a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds index 74d5855fe8..c322eef82b 100644 --- a/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds +++ b/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds @@ -13,84 +13,93 @@ * Declare on-board memory */ MEMORY { - ram : ORIGIN = 0x00000000, LENGTH = 4M - rom : ORIGIN = 0xFF000000, LENGTH = 1M - dpram : ORIGIN = 0xFE000000, LENGTH = 8k + ram : ORIGIN = 0x00000000, LENGTH = 4M + rom : ORIGIN = 0xFF000000, LENGTH = 1M + dpram : ORIGIN = 0xFE000000, LENGTH = 8k } /* * Declare some sizes + * XXX: The assignment of ". += XyzSize;" fails in older gld's if the + * number used there is not constant. If this happens to you, edit + * the lines marked below to use a constant value. */ +HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; +StackSize = DEFINED(StackSize) ? StackSize : 0x1000; /* - * XXX: The assignment of ". += XyzSize;" fails in older gld's if the - * number used there is not constant so the calculated sizes are - * ignored below and the default number is used instead. + * Declare low-order three octets of Ethernet address */ - -HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; -StackSize = DEFINED(StackSize) ? StackSize : 0x1000; +ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12; /* * Load objects */ SECTIONS { + /* + * Boot PROM + */ + rom : { + _RomBase = .; + __RomBase = .; + } >rom + + /* + * Dynamic RAM + */ + ram : { + _RamBase = .; + __RamBase = .; + } >ram + + /* + * Text, data and bss segments + */ .text : { - _RamBase = .; - __RamBase = .; - CREATE_OBJECT_SYMBOLS - *(.text) - . = ALIGN (16); - _etext = .; + CREATE_OBJECT_SYMBOLS + *(.text) + . = ALIGN (16); + etext = .; + _etext = .; } >ram .data : { - *(.data) - . = ALIGN (16); - _edata = .; + copy_start = .; + *(.data) + . = ALIGN (16); + _edata = .; + copy_end = .; } >ram .bss : { - M68Kvec = .; - _M68Kvec = .; - . += (256 * 4); - clear_start = .; - *(.bss) - *(COMMON) - . = ALIGN (16); - _end = .; - - _HeapStart = .; - __HeapStart = .; - /* XXX: Temporary to get around a gld bug - * - * . += HeapSize; - * . += StackSize; - */ - . += 0x10000; /* XXX */ - . += 0x1000; /* XXX */ + M68Kvec = .; + _M68Kvec = .; + . += (256 * 4); + clear_start = .; + *(.bss) + *(COMMON) + . = ALIGN (16); + _end = .; - . = ALIGN (16); - stack_init = .; - clear_end = .; + _HeapStart = .; + __HeapStart = .; + /* . += HeapSize; */ /* XXX -- Old gld can't handle this */ + /* . += StackSize; */ /* XXX -- Old gld can't handle this */ + . += 0x10000; /* HeapSize for old gld */ + . += 0x1000; /* StackSize for old gld */ + . = ALIGN (16); + stack_init = .; + clear_end = .; - _WorkspaceBase = .; - __WorkspaceBase = .; - } >ram - - /* - * On-chip memory/peripherals - */ - dpram : { - m360 = .; - _m360 = .; - . += (8 * 1024); + _WorkspaceBase = .; + __WorkspaceBase = .; + } >ram - } >dpram + /* + * On-chip memory/peripherals + */ + dpram : { + m360 = .; + _m360 = .; + . += (8 * 1024); - /* - * Boot PROM - */ - rom : { - _RomBase = .; - __RomBase = .; - } >rom + } >dpram } -- cgit v1.2.3