1 # Linker script for i386 go32 (DJGPP)
3 # Copyright (C) 2014-2019 Free Software Foundation, Inc.
5 # Copying and distribution of this file, with or without modification,
6 # are permitted in any medium without royalty provided the copyright
7 # notice and this notice are preserved.
9 test -z "$ENTRY" && ENTRY=start
10 EXE=${CONSTRUCTING+${RELOCATING+-exe}}
12 # These are substituted in as variables in order to get '}' in a shell
13 # conditional expansion.
24 /* Copyright (C) 2014-2019 Free Software Foundation, Inc.
26 Copying and distribution of this script, with or without modification,
27 are permitted in any medium without royalty provided the copyright
28 notice and this notice are preserved. */
30 OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
32 ${RELOCATING+ENTRY (${ENTRY})}
36 .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : {
38 ${RELOCATING+*(.text.*)}
39 ${RELOCATING+*(.gnu.linkonce.t*)}
42 ${RELOCATING+*(.gnu.linkonce.r*)}
43 ${RELOCATING+etext = . ; PROVIDE(_etext = .) ;}
44 ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
46 .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
47 ${RELOCATING+djgpp_first_ctor = . ;
50 djgpp_last_ctor = . ;}
51 ${RELOCATING+djgpp_first_dtor = . ;
54 djgpp_last_dtor = . ;}
56 ${RELOCATING+*(.data.*)}
58 ${RELOCATING+*(.gcc_exc*)}
59 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
60 ${RELOCATING+*(.eh_fram*)}
61 ${RELOCATING+___EH_FRAME_END__ = . ;}
62 ${RELOCATING+LONG(0);}
64 ${RELOCATING+*(.gnu.linkonce.d*)}
65 ${RELOCATING+edata = . ; PROVIDE(_edata = .) ;}
66 ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
68 ${CONSTRUCTING+${RELOCATING-$CTOR}}
69 ${CONSTRUCTING+${RELOCATING-$DTOR}}
70 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
72 *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
74 ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
75 ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
77 /* Stabs debugging sections. */
78 .stab 0 : { *(.stab) }
79 .stabstr 0 : { *(.stabstr) }
82 . $srcdir/scripttempl/DWARF.sc