1# $MirOS: src/gnu/usr.bin/binutils/ld/scripttempl/h8500.sc,v 1.2 2005/03/13 16:07:07 tg Exp $ 2# 3TORS=" 4 ___ctors = . ; 5 *(.ctors) 6 ___ctors_end = . ; 7 ___dtors = . ; 8 *(.dtors) 9 ___dtors_end = . ;" 10 11cat <<EOF 12OUTPUT_FORMAT("${OUTPUT_FORMAT}") 13OUTPUT_ARCH(${ARCH}) 14 15/* Code and data 64k total */ 16 17SECTIONS 18{ 19.text ${RELOCATING+ 0x0000} : 20 { 21 *(.text) 22 ${RELOCATING+ _etext = . ; } 23 } 24 25.data ${RELOCATING+ . } : 26 { 27 *(.data) 28 ${RELOCATING+ _edata = . ; } 29 } 30 31.rdata ${RELOCATING+ . } : 32 { 33 *(.rdata); 34 *(.strings) 35 36 ${CONSTRUCTING+${TORS}} 37 } 38 39.bss ${RELOCATING+ . } : 40 { 41 ${RELOCATING+ __start_bss = . ; } 42 *(.bss) 43 *(COMMON) 44 ${RELOCATING+ _end = . ; } 45 } 46 47.stack ${RELOCATING+ 0xfff0} : 48 { 49 ${RELOCATING+ _stack = . ; } 50 *(.stack) 51 } 52 53.stab 0 ${RELOCATING+\(NOLOAD\)} : 54 { 55 [ .stab ] 56 } 57 58.stabstr 0 ${RELOCATING+\(NOLOAD\)} : 59 { 60 [ .stabstr ] 61 } 62} 63EOF 64