2 # These variables may be overridden by the emulation file. The
3 # defaults are appropriate for a DECstation running Ultrix.
4 test -z "$ENTRY" && ENTRY=_start
6 #test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x0"
8 CTOR=".ctors ${CONSTRUCTING-0} :
10 ${CONSTRUCTING+${CTOR_START}}
11 /* gcc uses crtbegin.o to find the start of
12 the constructors, so we make sure it is
13 first. Because this is a wildcard, it
14 doesn't matter if the user does not
15 actually link against crtbegin.o; the
16 linker won't look for a file to match a
17 wildcard. The wildcard also means that it
18 doesn't matter which directory crtbegin.o
21 KEEP (*crtbegin.o(.ctors))
23 /* We don't want to include the .ctor section from
24 from the crtend.o file until after the sorted ctors.
25 The .ctor section from the crtend file contains the
26 end of ctors marker and it must be last */
28 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
29 KEEP (*(SORT(.ctors.*)))
31 ${CONSTRUCTING+${CTOR_END}}
34 DTOR=" .dtors ${CONSTRUCTING-0} :
36 ${CONSTRUCTING+${DTOR_START}}
37 KEEP (*crtbegin.o(.dtors))
38 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
39 KEEP (*(SORT(.dtors.*)))
41 ${CONSTRUCTING+${DTOR_END}}
45 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
46 "${LITTLE_OUTPUT_FORMAT}")
47 /*${LIB_SEARCH_DIRS}*/
48 ${RELOCATING+${LIB_SEARCH_DIRS}}
50 ${RELOCATING+ENTRY (${ENTRY})}
52 _TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x50;
53 _HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x0;
54 _STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x400;
58 .vectors.reset 0x0 : { KEEP (*(.vectors.reset)) } = 0
59 .vectors.sw_exception 0x8 : { KEEP (*(.vectors.sw_exception)) } = 0
60 .vectors.interrupt 0x10 : { KEEP (*(.vectors.interrupt)) } = 0
61 .vectors.debug_sw_break 0x18 : { KEEP (*(.vectors.debug_sw_break)) } = 0
62 .vectors.hw_exception 0x20 : { KEEP (*(.vectors.hw_exception)) } = 0
64 ${RELOCATING+. = _TEXT_START_ADDR;}
66 ${RELOCATING+ _ftext = .;}
68 ${RELOCATING+*(.text)}
69 ${RELOCATING+*(.text.*)}
70 ${RELOCATING+*(.gnu.linkonce.t.*)}
72 ${RELOCATING+ _etext = .;}
74 .init : { KEEP (*(.init)) } =0
75 .fini : { KEEP (*(.fini)) } =0
77 ${RELOCATING+PROVIDE (__CTOR_LIST__ = .);}
78 ${RELOCATING+PROVIDE (___CTOR_LIST__ = .);}
80 ${RELOCATING+PROVIDE (__CTOR_END__ = .);}
81 ${RELOCATING+PROVIDE (___CTOR_END__ = .);}
83 ${RELOCATING+PROVIDE (__DTOR_LIST__ = .);}
84 ${RELOCATING+PROVIDE (___DTOR_LIST__ = .);}
86 ${RELOCATING+PROVIDE (__DTOR_END__ = .);}
87 ${RELOCATING+PROVIDE (___DTOR_END__ = .);}
89 ${RELOCATING+ . = ALIGN(4);}
90 ${RELOCATING+ _frodata = . ;}
92 ${RELOCATING+*(.rodata)}
93 ${RELOCATING+*(.rodata.*)}
94 ${RELOCATING+*(.gnu.linkonce.r.*)}
95 ${CONSTRUCTING+CONSTRUCTORS}; /* Is this needed? */
97 ${RELOCATING+ _erodata = .;}
99 /* Alignments by 8 to ensure that _SDA2_BASE_ on a word boundary */
100 /* Note that .sdata2 and .sbss2 must be contiguous */
101 ${RELOCATING+. = ALIGN(8);}
102 ${RELOCATING+ _ssrw = .;}
104 ${RELOCATING+*(.sdata2)}
105 ${RELOCATING+*(.sdata2.*)}
106 ${RELOCATING+*(.gnu.linkonce.s2.*)}
108 ${RELOCATING+. = ALIGN(4);}
110 ${RELOCATING+PROVIDE (__sbss2_start = .);}
111 ${RELOCATING+*(.sbss2)}
112 ${RELOCATING+*(.sbss2.*)}
113 ${RELOCATING+*(.gnu.linkonce.sb2.*)}
114 ${RELOCATING+PROVIDE (__sbss2_end = .);}
116 ${RELOCATING+. = ALIGN(8);}
117 ${RELOCATING+ _essrw = .;}
118 ${RELOCATING+ _ssrw_size = _essrw - _ssrw;}
119 ${RELOCATING+ PROVIDE (_SDA2_BASE_ = _ssrw + (_ssrw_size / 2 ));}
121 ${RELOCATING+ . = ALIGN(4);}
122 ${RELOCATING+ _fdata = .;}
124 ${RELOCATING+*(.data)}
125 ${RELOCATING+*(.gnu.linkonce.d.*)}
126 ${CONSTRUCTING+CONSTRUCTORS}; /* Is this needed? */
128 ${RELOCATING+ _edata = . ;}
130 /* Added to handle pic code */
132 ${RELOCATING+*(.got)}
136 ${RELOCATING+*(.got1)}
140 ${RELOCATING+*(.got2)}
143 /* Added by Sathya to handle C++ exceptions */
145 ${RELOCATING+*(.eh_frame)}
149 ${RELOCATING+*(.jcr)}
152 .gcc_except_table : {
153 ${RELOCATING+*(.gcc_except_table)}
156 /* Alignments by 8 to ensure that _SDA_BASE_ on a word boundary */
157 /* Note that .sdata and .sbss must be contiguous */
158 ${RELOCATING+. = ALIGN(8);}
159 ${RELOCATING+ _ssro = .;}
161 ${RELOCATING+*(.sdata)}
162 ${RELOCATING+*(.sdata.*)}
163 ${RELOCATING+*(.gnu.linkonce.s.*)}
165 ${RELOCATING+. = ALIGN(4);}
167 ${RELOCATING+PROVIDE (__sbss_start = .);}
168 ${RELOCATING+*(.sbss)}
169 ${RELOCATING+*(.sbss.*)}
170 ${RELOCATING+*(.gnu.linkonce.sb.*)}
171 ${RELOCATING+PROVIDE (__sbss_end = .);}
173 ${RELOCATING+. = ALIGN(8);}
174 ${RELOCATING+ _essro = .;}
175 ${RELOCATING+ _ssro_size = _essro - _ssro;}
176 ${RELOCATING+PROVIDE (_SDA_BASE_ = _ssro + (_ssro_size / 2 ));}
178 ${RELOCATING+ . = ALIGN(4);}
179 ${RELOCATING+ _fbss = .;}
181 ${RELOCATING+PROVIDE (__bss_start = .);}
182 ${RELOCATING+*(.bss)}
183 ${RELOCATING+*(.bss.*)}
184 ${RELOCATING+*(.gnu.linkonce.b.*)}
185 ${RELOCATING+*(COMMON)}
186 ${RELOCATING+. = ALIGN(4);}
188 ${RELOCATING+PROVIDE (__bss_end = .);}
192 ${RELOCATING+ . = ALIGN(4);}
195 ${RELOCATING+ _heap = .;}
196 ${RELOCATING+ _heap_start = .;}
197 ${RELOCATING+ . += _HEAP_SIZE;}
198 ${RELOCATING+ _heap_end = .;}
201 ${RELOCATING+ . = ALIGN(4);}
204 ${RELOCATING+ _stack_end = .;}
205 ${RELOCATING+ . += _STACK_SIZE;}
206 ${RELOCATING+ . = ALIGN(8);}
207 ${RELOCATING+ _stack = .;}
208 ${RELOCATING+ _end = .;}
212 ${RELOCATING+*(.tdata)}
213 ${RELOCATING+*(.tdata.*)}
214 ${RELOCATING+*(.gnu.linkonce.td.*)}
217 ${RELOCATING+*(.tbss)}
218 ${RELOCATING+*(.tbss.*)}
219 ${RELOCATING+*(.gnu.linkonce.tb.*)}