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