/* Default linker script, for normal executables */ /* Linker script for 68HC11 executable (PROM). */ OUTPUT_FORMAT("elf32-m68hc11", "elf32-m68hc11", "elf32-m68hc11") OUTPUT_ARCH(m68hc11) ENTRY(ENTRYPT) SEARCH_DIR("/usr/local/m6811-elf/lib"); /* Fixed definition of the available memory banks. See generic emulation script for a user defined configuration. */ MEMORY { page0 (rw) : ORIGIN = 0x0, LENGTH = 256 data (rw) : ORIGIN = 0x8000, LENGTH = 0x3FC0 vectors (rw) : ORIGIN = 0xBFC0, LENGTH = 0x0040 text (rx) : ORIGIN = 0xC000, LENGTH = 0x3800 stack (rw) : ORIGIN = 0xF800, LENGTH = 0x0800 } /* Setup the stack on the top of the data memory bank. */ /* PROVIDE (_stack = 0x01100 + 0x6F00 - 1); */ SECTIONS { /* Concatenate .page0 sections. Put them in the page0 memory bank unless we are creating a relocatable file. */ .page0 : { *(.page0) *(.softregs) } > page0 .text : { *(.text) *(.text.*) } > text .data : { *(.data) *(.data.*) *(.rodata) *(.rodata.*) } > data /* If the 'vectors_addr' symbol is defined, it indicates the start address of interrupt vectors. This depends on the 68HC11 operating mode: Addr Single chip 0xffc0 Extended mode 0xffc0 Bootstrap 0x00c0 Test 0xbfc0 In general, the vectors address is 0xffc0. This can be overriden with the '-defsym vectors_addr=0xbfc0' ld option. Note: for the bootstrap mode, the interrupt vectors are at 0xbfc0 but they are redirected to 0x00c0 by the internal PROM. Application's vectors must also consist of jump instructions (see Motorola's manual). */ PROVIDE (_vectors_addr = DEFINED (vectors_addr) ? vectors_addr : 0xbfc0); .vectors (DEFINED (vectors_addr) ? vectors_addr : 0xbfc0) : { KEEP (*(.vectors)) } }