Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | cat << EOF |
2 | OUTPUT_FORMAT("elf32-v850", "elf32-v850", | |
3 | "elf32-v850") | |
4 | OUTPUT_ARCH(v850) | |
b34c1498 | 5 | ${RELOCATING+ENTRY(_start)} |
252b5132 | 6 | SEARCH_DIR(.); |
67010b46 | 7 | EXTERN(__ctbp __ep __gp); |
252b5132 RH |
8 | SECTIONS |
9 | { | |
10 | /* This saves a little space in the ELF file, since the zda starts | |
11 | at a higher location that the ELF headers take up. */ | |
12 | ||
40a633d5 NC |
13 | .zdata ${ZDATA_START_ADDR} : |
14 | { | |
252b5132 RH |
15 | *(.zdata) |
16 | *(.zbss) | |
17 | *(reszdata) | |
18 | *(.zcommon) | |
19 | } | |
20 | ||
21 | /* This is the read only part of the zero data area. | |
22 | Having it as a seperate section prevents its | |
23 | attributes from being inherited by the zdata | |
24 | section. Specifically it prevents the zdata | |
25 | section from being marked READONLY. */ | |
26 | ||
40a633d5 NC |
27 | .rozdata ${ROZDATA_START_ADDR} : |
28 | { | |
252b5132 RH |
29 | *(.rozdata) |
30 | *(romzdata) | |
31 | *(romzbss) | |
32 | } | |
33 | ||
40a633d5 | 34 | /* Read-only sections, merged into text segment. */ |
252b5132 RH |
35 | . = ${TEXT_START_ADDR}; |
36 | .interp : { *(.interp) } | |
37 | .hash : { *(.hash) } | |
38 | .dynsym : { *(.dynsym) } | |
39 | .dynstr : { *(.dynstr) } | |
40 | .rel.text : { *(.rel.text) } | |
41 | .rela.text : { *(.rela.text) } | |
42 | .rel.data : { *(.rel.data) } | |
43 | .rela.data : { *(.rela.data) } | |
44 | .rel.rodata : { *(.rel.rodata) } | |
45 | .rela.rodata : { *(.rela.rodata) } | |
cedacdc0 CM |
46 | .rel.gcc_except_table : { *(.rel.gcc_except_table) } |
47 | .rela.gcc_except_table : { *(.rela.gcc_except_table) } | |
252b5132 RH |
48 | .rel.got : { *(.rel.got) } |
49 | .rela.got : { *(.rela.got) } | |
50 | .rel.ctors : { *(.rel.ctors) } | |
51 | .rela.ctors : { *(.rela.ctors) } | |
52 | .rel.dtors : { *(.rel.dtors) } | |
53 | .rela.dtors : { *(.rela.dtors) } | |
54 | .rel.init : { *(.rel.init) } | |
55 | .rela.init : { *(.rela.init) } | |
56 | .rel.fini : { *(.rel.fini) } | |
57 | .rela.fini : { *(.rela.fini) } | |
58 | .rel.bss : { *(.rel.bss) } | |
59 | .rela.bss : { *(.rela.bss) } | |
60 | .rel.plt : { *(.rel.plt) } | |
61 | .rela.plt : { *(.rela.plt) } | |
62 | .init : { KEEP (*(.init)) } =0 | |
63 | .plt : { *(.plt) } | |
64 | ||
40a633d5 NC |
65 | .text : |
66 | { | |
252b5132 RH |
67 | *(.text) |
68 | ${RELOCATING+*(.text.*)} | |
40a633d5 | 69 | |
252b5132 RH |
70 | /* .gnu.warning sections are handled specially by elf32.em. */ |
71 | *(.gnu.warning) | |
72 | *(.gnu.linkonce.t*) | |
73 | } =0 | |
74 | ||
75 | ${RELOCATING+_etext = .;} | |
76 | ${RELOCATING+PROVIDE (etext = .);} | |
77 | ||
78 | /* This is special code area at the end of the normal text section. | |
79 | It contains a small lookup table at the start followed by the | |
80 | code pointed to by entries in the lookup table. */ | |
81 | ||
40a633d5 NC |
82 | .call_table_data ${CALL_TABLE_START_ADDR} : |
83 | { | |
252b5132 RH |
84 | ${RELOCATING+PROVIDE(__ctbp = .);} |
85 | *(.call_table_data) | |
40a633d5 NC |
86 | } = 0xff /* Fill gaps with 0xff. */ |
87 | ||
88 | .call_table_text : | |
89 | { | |
252b5132 RH |
90 | *(.call_table_text) |
91 | } | |
92 | ||
40a633d5 | 93 | .fini : { KEEP (*(.fini)) } =0 |
252b5132 RH |
94 | .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} *(.gnu.linkonce.r*) } |
95 | .rodata1 : { *(.rodata1) } | |
96 | ||
40a633d5 NC |
97 | .data : |
98 | { | |
252b5132 RH |
99 | *(.data) |
100 | ${RELOCATING+*(.data.*)} | |
101 | *(.gnu.linkonce.d*) | |
102 | CONSTRUCTORS | |
103 | } | |
104 | .data1 : { *(.data1) } | |
40a633d5 NC |
105 | .ctors : |
106 | { | |
107 | ${CONSTRUCTING+___ctors = .;} | |
4305932a RH |
108 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
109 | KEEP (*(SORT(.ctors.*))) | |
110 | KEEP (*crtend(.ctors)) | |
40a633d5 | 111 | ${CONSTRUCTING+___ctors_end = .;} |
252b5132 | 112 | } |
40a633d5 NC |
113 | .dtors : |
114 | { | |
115 | ${CONSTRUCTING+___dtors = .;} | |
4305932a RH |
116 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
117 | KEEP (*(SORT(.dtors.*))) | |
118 | KEEP (*crtend.o(.dtors)) | |
40a633d5 | 119 | ${CONSTRUCTING+___dtors_end = .;} |
252b5132 | 120 | } |
24098abb RH |
121 | .jcr : |
122 | { | |
123 | KEEP (*(.jcr)) | |
124 | } | |
252b5132 | 125 | |
cedacdc0 CM |
126 | .gcc_except_table : { *(.gcc_except_table) } |
127 | ||
252b5132 RH |
128 | .got : { *(.got.plt) *(.got) } |
129 | .dynamic : { *(.dynamic) } | |
130 | ||
40a633d5 NC |
131 | .tdata ${TDATA_START_ADDR} : |
132 | { | |
252b5132 RH |
133 | ${RELOCATING+PROVIDE (__ep = .);} |
134 | *(.tbyte) | |
135 | *(.tcommon_byte) | |
136 | *(.tdata) | |
137 | *(.tbss) | |
138 | *(.tcommon) | |
139 | } | |
140 | ||
141 | /* We want the small data sections together, so single-instruction offsets | |
142 | can access them all, and initialized data all before uninitialized, so | |
143 | we can shorten the on-disk segment size. */ | |
40a633d5 NC |
144 | |
145 | .sdata ${SDATA_START_ADDR} : | |
146 | { | |
252b5132 RH |
147 | ${RELOCATING+PROVIDE (__gp = . + 0x8000);} |
148 | *(.sdata) | |
149 | } | |
150 | ||
151 | /* See comment about .rozdata. */ | |
40a633d5 NC |
152 | .rosdata ${ROSDATA_START_ADDR} : |
153 | { | |
252b5132 RH |
154 | *(.rosdata) |
155 | } | |
156 | ||
157 | /* We place the .sbss data section AFTER the .rosdata section, so that | |
158 | it can directly preceed the .bss section. This allows runtime startup | |
159 | code to initialise all the zero-data sections by simply taking the | |
40a633d5 NC |
160 | value of '_edata' and zeroing until it reaches '_end'. */ |
161 | ||
162 | .sbss : | |
163 | { | |
252b5132 RH |
164 | ${RELOCATING+__sbss_start = .;} |
165 | *(.sbss) | |
166 | *(.scommon) | |
167 | } | |
168 | ||
169 | ${RELOCATING+_edata = DEFINED (__sbss_start) ? __sbss_start : . ;} | |
170 | ${RELOCATING+PROVIDE (edata = _edata);} | |
171 | ||
172 | .bss : | |
173 | { | |
174 | ${RELOCATING+__bss_start = DEFINED (__sbss_start) ? __sbss_start : . ;} | |
175 | ${RELOCATING+__real_bss_start = . ;} | |
176 | *(.dynbss) | |
177 | *(.bss) | |
178 | *(COMMON) | |
179 | } | |
180 | ||
181 | ${RELOCATING+_end = . ;} | |
182 | ${RELOCATING+PROVIDE (end = .);} | |
f20db198 | 183 | ${RELOCATING+PROVIDE (_heap_start = .);} |
252b5132 RH |
184 | |
185 | /* Stabs debugging sections. */ | |
186 | .stab 0 : { *(.stab) } | |
187 | .stabstr 0 : { *(.stabstr) } | |
188 | .stab.excl 0 : { *(.stab.excl) } | |
189 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
190 | .stab.index 0 : { *(.stab.index) } | |
191 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
192 | .comment 0 : { *(.comment) } | |
193 | ||
194 | /* DWARF debug sections. | |
195 | Symbols in the DWARF debugging sections are relative to the beginning | |
196 | of the section so we begin them at 0. */ | |
197 | ||
198 | /* DWARF 1 */ | |
199 | .debug 0 : { *(.debug) } | |
200 | .line 0 : { *(.line) } | |
201 | ||
202 | /* GNU DWARF 1 extensions */ | |
09b910c6 AM |
203 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
204 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
252b5132 RH |
205 | |
206 | /* DWARF 1.1 and DWARF 2 */ | |
09b910c6 AM |
207 | .debug_aranges 0 : { *(.debug_aranges) } |
208 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
252b5132 RH |
209 | |
210 | /* DWARF 2 */ | |
09b910c6 AM |
211 | .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } |
212 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
213 | .debug_line 0 : { *(.debug_line) } | |
214 | .debug_frame 0 : { *(.debug_frame) } | |
215 | .debug_str 0 : { *(.debug_str) } | |
216 | .debug_loc 0 : { *(.debug_loc) } | |
217 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
252b5132 | 218 | |
40a633d5 | 219 | /* SGI/MIPS DWARF 2 extensions. */ |
09b910c6 AM |
220 | .debug_weaknames 0 : { *(.debug_weaknames) } |
221 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
222 | .debug_typenames 0 : { *(.debug_typenames) } | |
223 | .debug_varnames 0 : { *(.debug_varnames) } | |
252b5132 | 224 | |
40a633d5 NC |
225 | /* User stack. */ |
226 | .stack 0x200000 : | |
227 | { | |
252b5132 RH |
228 | ${RELOCATING+__stack = .;} |
229 | *(.stack) | |
230 | } | |
252b5132 RH |
231 | } |
232 | EOF |