133965Sjdp# Linker script for 386 COFF. This works on SVR3.2 and SCO Unix 3.2.2. 233965Sjdp# Ian Taylor <ian@cygnus.com>. 333965Sjdptest -z "$ENTRY" && ENTRY=_start 433965Sjdp# These are substituted in as variables in order to get '}' in a shell 533965Sjdp# conditional expansion. 633965SjdpINIT='.init : { *(.init) }' 733965SjdpFINI='.fini : { *(.fini) }' 833965Sjdpcat <<EOF 933965SjdpOUTPUT_FORMAT("${OUTPUT_FORMAT}") 1033965Sjdp${LIB_SEARCH_DIRS} 1133965Sjdp 1233965SjdpENTRY(${ENTRY}) 1333965Sjdp 1433965SjdpSECTIONS 1533965Sjdp{ 1633965Sjdp .text ${RELOCATING+ SIZEOF_HEADERS} : { 1733965Sjdp ${RELOCATING+ *(.init)} 1833965Sjdp *(.text) 1933965Sjdp ${RELOCATING+ *(.fini)} 2033965Sjdp ${RELOCATING+ etext = .}; 2133965Sjdp } 2233965Sjdp .data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : { 2333965Sjdp *(.data) 2433965Sjdp ${RELOCATING+ edata = .}; 2533965Sjdp } 2633965Sjdp .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : 2733965Sjdp { 2833965Sjdp *(.bss) 2933965Sjdp *(COMMON) 3033965Sjdp ${RELOCATING+ end = .}; 3133965Sjdp } 3233965Sjdp ${RELOCATING- ${INIT}} 3333965Sjdp ${RELOCATING- ${FINI}} 3433965Sjdp .stab 0 ${RELOCATING+(NOLOAD)} : 3533965Sjdp { 3633965Sjdp [ .stab ] 3733965Sjdp } 3833965Sjdp .stabstr 0 ${RELOCATING+(NOLOAD)} : 3933965Sjdp { 4033965Sjdp [ .stabstr ] 4133965Sjdp } 4233965Sjdp} 4333965SjdpEOF 44