1# $MirOS: src/gnu/usr.bin/binutils/ld/scripttempl/sh.sc,v 1.2 2005/03/13 16:07:08 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(${ARCH}) 16 17MEMORY 18{ 19 ram : o = 0x1000, l = 512k 20} 21 22SECTIONS 23{ 24 .text : 25 { 26 *(.text) 27 *(.strings) 28 ${RELOCATING+ _etext = . ; } 29 } ${RELOCATING+ > ram} 30 ${CONSTRUCTING+${TORS}} 31 .data : 32 { 33 *(.data) 34 ${RELOCATING+*(.gcc_exc*)} 35 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;} 36 ${RELOCATING+*(.eh_fram*)} 37 ${RELOCATING+___EH_FRAME_END__ = . ;} 38 ${RELOCATING+LONG(0);} 39 ${RELOCATING+ _edata = . ; } 40 } ${RELOCATING+ > ram} 41 .bss : 42 { 43 ${RELOCATING+ _bss_start = . ; } 44 *(.bss) 45 *(COMMON) 46 ${RELOCATING+ _end = . ; } 47 } ${RELOCATING+ > ram} 48 .stack ${RELOCATING+ 0x30000 } : 49 { 50 ${RELOCATING+ _stack = . ; } 51 *(.stack) 52 } ${RELOCATING+ > ram} 53 .stab 0 ${RELOCATING+\(NOLOAD\)} : 54 { 55 *(.stab) 56 } 57 .stabstr 0 ${RELOCATING+\(NOLOAD\)} : 58 { 59 *(.stabstr) 60 } 61} 62EOF 63 64 65 66 67