Commit | Line | Data |
---|---|---|
252b5132 RH |
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. | |
062739d1 NC |
8 | CTOR='.ctor : { |
9 | *(SORT(.ctors.*)) | |
10 | *(.ctor) | |
11 | }' | |
12 | DTOR='.dtor : { | |
13 | *(SORT(.dtors.*)) | |
14 | *(.dtor) | |
15 | }' | |
252b5132 RH |
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) | |
5a1bd109 | 26 | ${RELOCATING+*(.gnu.linkonce.t*)} |
252b5132 RH |
27 | *(.const*) |
28 | *(.ro*) | |
5a1bd109 | 29 | ${RELOCATING+*(.gnu.linkonce.r*)} |
93b63cd3 | 30 | ${RELOCATING+etext = . ; PROVIDE(_etext = .) ;} |
252b5132 RH |
31 | ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});} |
32 | } | |
33 | .data ${RELOCATING+ ${DATA_ALIGNMENT}} : { | |
34 | ${RELOCATING+djgpp_first_ctor = . ; | |
062739d1 | 35 | *(SORT(.ctors.*)) |
252b5132 RH |
36 | *(.ctor) |
37 | djgpp_last_ctor = . ;} | |
38 | ${RELOCATING+djgpp_first_dtor = . ; | |
062739d1 | 39 | *(SORT(.dtors.*)) |
252b5132 RH |
40 | *(.dtor) |
41 | djgpp_last_dtor = . ;} | |
42 | *(.data) | |
9c9ef45f ILT |
43 | |
44 | ${RELOCATING+*(.gcc_exc*)} | |
45 | ${RELOCATING+___EH_FRAME_BEGIN__ = . ;} | |
46 | ${RELOCATING+*(.eh_fram*)} | |
47 | ${RELOCATING+___EH_FRAME_END__ = . ;} | |
48 | ${RELOCATING+LONG(0);} | |
49 | ||
5a1bd109 | 50 | ${RELOCATING+*(.gnu.linkonce.d*)} |
93b63cd3 | 51 | ${RELOCATING+edata = . ; PROVIDE(_edata = .) ;} |
5a1bd109 | 52 | ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});} |
252b5132 RH |
53 | } |
54 | ${CONSTRUCTING+${RELOCATING-$CTOR}} | |
55 | ${CONSTRUCTING+${RELOCATING-$DTOR}} | |
56 | .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : | |
57 | { | |
58 | *(.bss) | |
59 | *(COMMON) | |
93b63cd3 | 60 | ${RELOCATING+ end = . ; PROVIDE(_end = .) ;} |
252b5132 RH |
61 | ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});} |
62 | } | |
93b63cd3 DD |
63 | /* DWARF 2 */ |
64 | .debug_aranges 0 : { *(.debug_aranges) } | |
65 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
66 | .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } | |
67 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
68 | .debug_line 0 : { *(.debug_line) } | |
69 | .debug_frame 0 : { *(.debug_frame) } | |
70 | .debug_str 0 : { *(.debug_str) } | |
71 | .debug_loc 0 : { *(.debug_loc) } | |
72 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
252b5132 RH |
73 | } |
74 | EOF |