]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/scripttempl/i386go32.sc
This commit was manufactured by cvs2svn to create branch
[thirdparty/binutils-gdb.git] / ld / scripttempl / i386go32.sc
CommitLineData
252b5132
RH
1# Linker script for i386 go32 (DJGPP)
2
3test -z "$ENTRY" && ENTRY=start
4EXE=${CONSTRUCTING+${RELOCATING+-exe}}
5
6# These are substituted in as variables in order to get '}' in a shell
7# conditional expansion.
062739d1
NC
8CTOR='.ctor : {
9 *(SORT(.ctors.*))
10 *(.ctor)
11 }'
12DTOR='.dtor : {
13 *(SORT(.dtors.*))
14 *(.dtor)
15 }'
252b5132
RH
16
17cat <<EOF
18OUTPUT_FORMAT("${OUTPUT_FORMAT}${EXE}")
19
20ENTRY(${ENTRY})
21
22SECTIONS
23{
24 .text ${RELOCATING+ ${TARGET_PAGE_SIZE}+SIZEOF_HEADERS} : {
25 *(.text)
c20ec07b 26 ${RELOCATING+*(.text.*)}
5a1bd109 27 ${RELOCATING+*(.gnu.linkonce.t*)}
252b5132
RH
28 *(.const*)
29 *(.ro*)
5a1bd109 30 ${RELOCATING+*(.gnu.linkonce.r*)}
93b63cd3 31 ${RELOCATING+etext = . ; PROVIDE(_etext = .) ;}
252b5132
RH
32 ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
33 }
34 .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
35 ${RELOCATING+djgpp_first_ctor = . ;
062739d1 36 *(SORT(.ctors.*))
252b5132
RH
37 *(.ctor)
38 djgpp_last_ctor = . ;}
39 ${RELOCATING+djgpp_first_dtor = . ;
062739d1 40 *(SORT(.dtors.*))
252b5132
RH
41 *(.dtor)
42 djgpp_last_dtor = . ;}
43 *(.data)
c20ec07b 44 ${RELOCATING+*(.data.*)}
9c9ef45f
ILT
45
46 ${RELOCATING+*(.gcc_exc*)}
47 ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
48 ${RELOCATING+*(.eh_fram*)}
49 ${RELOCATING+___EH_FRAME_END__ = . ;}
50 ${RELOCATING+LONG(0);}
51
5a1bd109 52 ${RELOCATING+*(.gnu.linkonce.d*)}
93b63cd3 53 ${RELOCATING+edata = . ; PROVIDE(_edata = .) ;}
5a1bd109 54 ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
252b5132
RH
55 }
56 ${CONSTRUCTING+${RELOCATING-$CTOR}}
57 ${CONSTRUCTING+${RELOCATING-$DTOR}}
58 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
59 {
8e616ecc 60 *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
252b5132 61 *(COMMON)
93b63cd3 62 ${RELOCATING+ end = . ; PROVIDE(_end = .) ;}
252b5132
RH
63 ${RELOCATING+ . = ALIGN(${SEGMENT_SIZE});}
64 }
c20ec07b
NC
65 /* Stabs debugging sections. */
66 .stab 0 : { *(.stab) }
67 .stabstr 0 : { *(.stabstr) }
93b63cd3
DD
68 /* DWARF 2 */
69 .debug_aranges 0 : { *(.debug_aranges) }
70 .debug_pubnames 0 : { *(.debug_pubnames) }
71 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
72 .debug_abbrev 0 : { *(.debug_abbrev) }
73 .debug_line 0 : { *(.debug_line) }
74 .debug_frame 0 : { *(.debug_frame) }
75 .debug_str 0 : { *(.debug_str) }
76 .debug_loc 0 : { *(.debug_loc) }
77 .debug_macinfo 0 : { *(.debug_macinfo) }
252b5132
RH
78}
79EOF