1# $MirOS: src/gnu/usr.bin/binutils/ld/scripttempl/pj.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 = 512M 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+ _edata = . ; } 35 } ${RELOCATING+ > ram} 36 .bss : 37 { 38 ${RELOCATING+ _bss_start = . ; } 39 *(.bss) 40 *(COMMON) 41 ${RELOCATING+ _end = . ; } 42 } ${RELOCATING+ > ram} 43 .stack ${RELOCATING+ 0x30000 } : 44 { 45 ${RELOCATING+ _stack = . ; } 46 *(.stack) 47 } ${RELOCATING+ > ram} 48 .stab 0 ${RELOCATING+\(NOLOAD\)} : 49 { 50 *(.stab) 51 } 52 .stabstr 0 ${RELOCATING+\(NOLOAD\)} : 53 { 54 *(.stabstr) 55 } 56} 57EOF 58