2000-10-09 Kazu Hirata <kazu@hxi.com>
[deliverable/binutils-gdb.git] / ld / scripttempl / i386go32.sc
1 # Linker script for i386 go32 (DJGPP)
2
3 test -z "$ENTRY" && ENTRY=start
4 EXE=${CONSTRUCTING+${RELOCATING+-exe}}
5
6 # These are substituted in as variables in order to get '}' in a shell
7 # conditional expansion.
8 CTOR='.ctor : {
9 *(SORT(.ctors.*))
10 *(.ctor)
11 }'
12 DTOR='.dtor : {
13 *(SORT(.dtors.*))
14 *(.dtor)
15 }'
16
17 cat <<EOF
18 OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
19
20 ENTRY(${ENTRY})
21
22 SECTIONS
23 {
24 .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : {
25 *(.text)
26 ${RELOCATING+*(.gnu.linkonce.t*)}
27 *(.const*)
28 *(.ro*)
29 ${RELOCATING+*(.gnu.linkonce.r*)}
30 ${RELOCATING+etext = . ; _etext = . ;}
31 ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
32 }
33 .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
34 ${RELOCATING+djgpp_first_ctor = . ;
35 *(SORT(.ctors.*))
36 *(.ctor)
37 djgpp_last_ctor = . ;}
38 ${RELOCATING+djgpp_first_dtor = . ;
39 *(SORT(.dtors.*))
40 *(.dtor)
41 djgpp_last_dtor = . ;}
42 *(.data)
43
44 ${RELOCATING+*(.gcc_exc*)}
45 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
46 ${RELOCATING+*(.eh_fram*)}
47 ${RELOCATING+___EH_FRAME_END__ = . ;}
48 ${RELOCATING+LONG(0);}
49
50 ${RELOCATING+*(.gnu.linkonce.d*)}
51 ${RELOCATING+edata = . ; _edata = . ;}
52 ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
53 }
54 ${CONSTRUCTING+${RELOCATING-$CTOR}}
55 ${CONSTRUCTING+${RELOCATING-$DTOR}}
56 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
57 {
58 *(.bss)
59 *(COMMON)
60 ${RELOCATING+ end = . ; _end = . ;}
61 ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
62 }
63 }
64 EOF
This page took 0.030576 seconds and 4 git commands to generate.