1# $MirOS: src/gnu/usr.bin/binutils/ld/scripttempl/h8300sn.sc,v 1.2 2005/03/13 16:07:07 tg Exp $ 2# 3TORS=".tors : 4 { 5 ___ctors = . ; 6 *(.ctors) 7 ___ctors_end = . ; 8 ___dtors = . ; 9 *(.dtors) 10 ___dtors_end = . ; 11 } > ram" 12 13cat <<EOF 14OUTPUT_FORMAT("${OUTPUT_FORMAT}") 15OUTPUT_ARCH(h8300sn) 16ENTRY("_start") 17 18MEMORY 19{ 20 /* 0xc4 is a magic entry. We should have the linker just 21 skip over it one day... */ 22 vectors : o = 0x0000, l = 0xc4 23 magicvectors : o = 0xc4, l = 0x3c 24 ram : o = 0x0100, l = 0xfdfc 25 /* The stack starts at the top of main ram. */ 26 topram : o = 0xfefc, l = 0x4 27 /* At the very top of the address space is the 8-bit area. */ 28 eight : o = 0xff00, l = 0x100 29} 30 31SECTIONS 32{ 33.vectors : 34 { 35 /* Use something like this to place a specific 36 function's address into the vector table. 37 38 SHORT (ABSOLUTE (_foobar)). */ 39 40 *(.vectors) 41 } ${RELOCATING+ > vectors} 42 43.text : 44 { 45 *(.rodata) 46 *(.text) 47 *(.strings) 48 ${RELOCATING+ _etext = . ; } 49 } ${RELOCATING+ > ram} 50 51${CONSTRUCTING+${TORS}} 52 53.data : 54 { 55 *(.data) 56 *(.tiny) 57 ${RELOCATING+ _edata = . ; } 58 } ${RELOCATING+ > ram} 59 60.bss : 61 { 62 ${RELOCATING+ _bss_start = . ;} 63 *(.bss) 64 *(COMMON) 65 ${RELOCATING+ _end = . ; } 66 } ${RELOCATING+ >ram} 67 68.stack : 69 { 70 ${RELOCATING+ _stack = . ; } 71 *(.stack) 72 } ${RELOCATING+ > topram} 73 74.eight : 75 { 76 *(.eight) 77 } ${RELOCATING+ > eight} 78 79.stab 0 ${RELOCATING+\(NOLOAD\)} : 80 { 81 [ .stab ] 82 } 83 84.stabstr 0 ${RELOCATING+\(NOLOAD\)} : 85 { 86 [ .stabstr ] 87 } 88} 89EOF 90