1219820SjeffTORS=".tors : 2219820Sjeff { 3219820Sjeff ___ctors = . ; 4219820Sjeff *(.ctors) 5219820Sjeff ___ctors_end = . ; 6219820Sjeff ___dtors = . ; 7219820Sjeff *(.dtors) 8219820Sjeff ___dtors_end = . ; 9219820Sjeff } > ram" 10219820Sjeff 11219820Sjeffcat <<EOF 12219820SjeffOUTPUT_FORMAT("${OUTPUT_FORMAT}") 13219820SjeffOUTPUT_ARCH(${ARCH}) 14219820SjeffENTRY("_start") 15219820Sjeff 16219820SjeffMEMORY 17219820Sjeff{ 18219820Sjeff /* 0xc4 is a magic entry. We should have the linker just 19219820Sjeff skip over it one day... */ 20219820Sjeff vectors : o = 0x0000, l = 0xc4 21219820Sjeff magicvectors : o = 0xc4, l = 0x3c 22219820Sjeff ram : o = 0x0100, l = 0xfdfc 23219820Sjeff /* The stack starts at the top of main ram. */ 24219820Sjeff topram : o = 0xfefc, l = 0x4 25219820Sjeff /* At the very top of the address space is the 8-bit area. */ 26219820Sjeff eight : o = 0xff00, l = 0x100 27219820Sjeff} 28219820Sjeff 29219820SjeffSECTIONS 30219820Sjeff{ 31219820Sjeff.vectors : 32219820Sjeff { 33219820Sjeff /* Use something like this to place a specific 34219820Sjeff function's address into the vector table. 35219820Sjeff 36219820Sjeff SHORT (ABSOLUTE (_foobar)). */ 37219820Sjeff 38219820Sjeff *(.vectors) 39219820Sjeff } ${RELOCATING+ > vectors} 40219820Sjeff 41219820Sjeff.init : 42219820Sjeff { 43219820Sjeff *(.init) 44219820Sjeff } ${RELOCATING+ > ram} 45219820Sjeff 46219820Sjeff.text : 47219820Sjeff { 48219820Sjeff *(.rodata) 49219820Sjeff *(.text) 50219820Sjeff *(.text.*) 51219820Sjeff *(.strings) 52219820Sjeff ${RELOCATING+ _etext = . ; } 53219820Sjeff } ${RELOCATING+ > ram} 54219820Sjeff 55219820Sjeff${CONSTRUCTING+${TORS}} 56219820Sjeff 57219820Sjeff.data : 58219820Sjeff { 59219820Sjeff *(.data) 60219820Sjeff *(.data.*) 61219820Sjeff *(.tiny) 62219820Sjeff ${RELOCATING+ _edata = . ; } 63219820Sjeff } ${RELOCATING+ > ram} 64219820Sjeff 65219820Sjeff.bss : 66219820Sjeff { 67219820Sjeff ${RELOCATING+ _bss_start = . ;} 68219820Sjeff *(.bss) 69219820Sjeff *(COMMON) 70219820Sjeff ${RELOCATING+ _end = . ; } 71219820Sjeff } ${RELOCATING+ >ram} 72219820Sjeff 73219820Sjeff.stack : 74219820Sjeff { 75219820Sjeff ${RELOCATING+ _stack = . ; } 76219820Sjeff *(.stack) 77219820Sjeff } ${RELOCATING+ > topram} 78219820Sjeff 79219820Sjeff.eight : 80219820Sjeff { 81219820Sjeff *(.eight) 82219820Sjeff } ${RELOCATING+ > eight} 83219820Sjeff 84219820Sjeff.stab 0 ${RELOCATING+(NOLOAD)} : 85219820Sjeff { 86219820Sjeff [ .stab ] 87219820Sjeff } 88219820Sjeff 89219820Sjeff.stabstr 0 ${RELOCATING+(NOLOAD)} : 90219820Sjeff { 91219820Sjeff [ .stabstr ] 92219820Sjeff } 93219820Sjeff} 94219820SjeffEOF 95219820Sjeff