1*3d8817e4Smiod# Linker script for i386 go32 (DJGPP) 2*3d8817e4Smiod 3*3d8817e4Smiodtest -z "$ENTRY" && ENTRY=start 4*3d8817e4SmiodEXE=${CONSTRUCTING+${RELOCATING+-exe}} 5*3d8817e4Smiod 6*3d8817e4Smiod# These are substituted in as variables in order to get '}' in a shell 7*3d8817e4Smiod# conditional expansion. 8*3d8817e4SmiodCTOR='.ctor : { 9*3d8817e4Smiod *(SORT(.ctors.*)) 10*3d8817e4Smiod *(.ctor) 11*3d8817e4Smiod }' 12*3d8817e4SmiodDTOR='.dtor : { 13*3d8817e4Smiod *(SORT(.dtors.*)) 14*3d8817e4Smiod *(.dtor) 15*3d8817e4Smiod }' 16*3d8817e4Smiod 17*3d8817e4Smiodcat <<EOF 18*3d8817e4SmiodOUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}") 19*3d8817e4Smiod 20*3d8817e4SmiodENTRY(${ENTRY}) 21*3d8817e4Smiod 22*3d8817e4SmiodSECTIONS 23*3d8817e4Smiod{ 24*3d8817e4Smiod .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : { 25*3d8817e4Smiod *(.text) 26*3d8817e4Smiod ${RELOCATING+*(.text.*)} 27*3d8817e4Smiod ${RELOCATING+*(.gnu.linkonce.t*)} 28*3d8817e4Smiod *(.const*) 29*3d8817e4Smiod *(.ro*) 30*3d8817e4Smiod ${RELOCATING+*(.gnu.linkonce.r*)} 31*3d8817e4Smiod ${RELOCATING+etext = . ; PROVIDE(_etext = .) ;} 32*3d8817e4Smiod ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});} 33*3d8817e4Smiod } 34*3d8817e4Smiod .data ${RELOCATING+ ${DATA_ALIGNMENT}} : { 35*3d8817e4Smiod ${RELOCATING+djgpp_first_ctor = . ; 36*3d8817e4Smiod *(SORT(.ctors.*)) 37*3d8817e4Smiod *(.ctor) 38*3d8817e4Smiod djgpp_last_ctor = . ;} 39*3d8817e4Smiod ${RELOCATING+djgpp_first_dtor = . ; 40*3d8817e4Smiod *(SORT(.dtors.*)) 41*3d8817e4Smiod *(.dtor) 42*3d8817e4Smiod djgpp_last_dtor = . ;} 43*3d8817e4Smiod *(.data) 44*3d8817e4Smiod ${RELOCATING+*(.data.*)} 45*3d8817e4Smiod 46*3d8817e4Smiod ${RELOCATING+*(.gcc_exc*)} 47*3d8817e4Smiod ${RELOCATING+___EH_FRAME_BEGIN__ = . ;} 48*3d8817e4Smiod ${RELOCATING+*(.eh_fram*)} 49*3d8817e4Smiod ${RELOCATING+___EH_FRAME_END__ = . ;} 50*3d8817e4Smiod ${RELOCATING+LONG(0);} 51*3d8817e4Smiod 52*3d8817e4Smiod ${RELOCATING+*(.gnu.linkonce.d*)} 53*3d8817e4Smiod ${RELOCATING+edata = . ; PROVIDE(_edata = .) ;} 54*3d8817e4Smiod ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});} 55*3d8817e4Smiod } 56*3d8817e4Smiod ${CONSTRUCTING+${RELOCATING-$CTOR}} 57*3d8817e4Smiod ${CONSTRUCTING+${RELOCATING-$DTOR}} 58*3d8817e4Smiod .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 59*3d8817e4Smiod { 60*3d8817e4Smiod *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) 61*3d8817e4Smiod *(COMMON) 62*3d8817e4Smiod ${RELOCATING+ end = . ; PROVIDE(_end = .) ;} 63*3d8817e4Smiod ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});} 64*3d8817e4Smiod } 65*3d8817e4Smiod /* Stabs debugging sections. */ 66*3d8817e4Smiod .stab 0 : { *(.stab) } 67*3d8817e4Smiod .stabstr 0 : { *(.stabstr) } 68*3d8817e4Smiod /* DWARF 2 */ 69*3d8817e4Smiod .debug_aranges 0 : { *(.debug_aranges) } 70*3d8817e4Smiod .debug_pubnames 0 : { *(.debug_pubnames) } 71*3d8817e4Smiod .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } 72*3d8817e4Smiod .debug_abbrev 0 : { *(.debug_abbrev) } 73*3d8817e4Smiod .debug_line 0 : { *(.debug_line) } 74*3d8817e4Smiod .debug_frame 0 : { *(.debug_frame) } 75*3d8817e4Smiod .debug_str 0 : { *(.debug_str) } 76*3d8817e4Smiod .debug_loc 0 : { *(.debug_loc) } 77*3d8817e4Smiod .debug_macinfo 0 : { *(.debug_macinfo) } 78*3d8817e4Smiod} 79*3d8817e4SmiodEOF 80