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