1999-05-03 09:29:11 +02:00
|
|
|
# Linker script for i386 go32 (DJGPP)
|
|
|
|
|
|
|
|
test -z "$ENTRY" && ENTRY=start
|
|
|
|
EXE=${CONSTRUCTING+${RELOCATING+-exe}}
|
|
|
|
|
|
|
|
# These are substituted in as variables in order to get '}' in a shell
|
|
|
|
# conditional expansion.
|
|
|
|
CTOR='.ctor : { *(.ctor) }'
|
|
|
|
DTOR='.dtor : { *(.dtor) }'
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
|
|
|
|
|
|
|
|
ENTRY(${ENTRY})
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : {
|
|
|
|
*(.text)
|
1999-07-22 03:42:27 +02:00
|
|
|
${RELOCATING+*(.gnu.linkonce.t*)}
|
1999-05-03 09:29:11 +02:00
|
|
|
*(.const*)
|
|
|
|
*(.ro*)
|
1999-07-22 03:42:27 +02:00
|
|
|
${RELOCATING+*(.gnu.linkonce.r*)}
|
2000-02-28 04:55:16 +01:00
|
|
|
${RELOCATING+etext = . ; _etext = . ;}
|
1999-05-03 09:29:11 +02:00
|
|
|
${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
|
|
|
|
}
|
|
|
|
.data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
|
|
|
|
${RELOCATING+djgpp_first_ctor = . ;
|
|
|
|
*(.ctor)
|
|
|
|
djgpp_last_ctor = . ;}
|
|
|
|
${RELOCATING+djgpp_first_dtor = . ;
|
|
|
|
*(.dtor)
|
|
|
|
djgpp_last_dtor = . ;}
|
|
|
|
*(.data)
|
1999-08-10 05:07:46 +02:00
|
|
|
|
|
|
|
${RELOCATING+*(.gcc_exc*)}
|
|
|
|
${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
|
|
|
|
${RELOCATING+*(.eh_fram*)}
|
|
|
|
${RELOCATING+___EH_FRAME_END__ = . ;}
|
|
|
|
${RELOCATING+LONG(0);}
|
|
|
|
|
1999-07-22 03:42:27 +02:00
|
|
|
${RELOCATING+*(.gnu.linkonce.d*)}
|
2000-02-28 04:55:16 +01:00
|
|
|
${RELOCATING+edata = . ; _edata = . ;}
|
1999-07-22 03:42:27 +02:00
|
|
|
${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
|
1999-05-03 09:29:11 +02:00
|
|
|
}
|
|
|
|
${CONSTRUCTING+${RELOCATING-$CTOR}}
|
|
|
|
${CONSTRUCTING+${RELOCATING-$DTOR}}
|
|
|
|
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
|
|
|
|
{
|
|
|
|
*(.bss)
|
|
|
|
*(COMMON)
|
2000-02-28 04:55:16 +01:00
|
|
|
${RELOCATING+ end = . ; _end = . ;}
|
1999-05-03 09:29:11 +02:00
|
|
|
${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|