]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - ld/scripttempl/v850.sc
Fix for PR 17063 - do not create a section called .call_table, instead create
[thirdparty/binutils-gdb.git] / ld / scripttempl / v850.sc
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 : { *(.init) } =0
59 .plt : { *(.plt) }
60
61 .text : {
62 *(.text)
63 /* .gnu.warning sections are handled specially by elf32.em. */
64 *(.gnu.warning)
65 *(.gnu.linkonce.t*)
66 } =0
67
68 ${RELOCATING+_etext = .;}
69 ${RELOCATING+PROVIDE (etext = .);}
70
71 /* start-sanitize-v850e */
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 /* end-sanitize-v850e */
85
86 .fini : { *(.fini) } =0
87 .rodata : { *(.rodata) *(.gnu.linkonce.r*) }
88 .rodata1 : { *(.rodata1) }
89
90 .data : {
91 *(.data)
92 *(.gnu.linkonce.d*)
93 CONSTRUCTORS
94 }
95 .data1 : { *(.data1) }
96 .ctors : {
97 ${RELOCATING+___ctors = .;}
98 *(.ctors)
99 ${RELOCATING+___ctors_end = .;}
100 }
101
102 .dtors : {
103 ${RELOCATING+___dtors = .;}
104 *(.dtors)
105 ${RELOCATING+___dtors_end = .;}
106 }
107
108 .got : { *(.got.plt) *(.got) }
109 .dynamic : { *(.dynamic) }
110
111 .tdata ${TDATA_START_ADDR} : {
112 ${RELOCATING+PROVIDE (__ep = .);}
113 *(.tbyte)
114 *(.tcommon_byte)
115 *(.tdata)
116 *(.tbss)
117 *(.tcommon)
118 }
119
120 /* We want the small data sections together, so single-instruction offsets
121 can access them all, and initialized data all before uninitialized, so
122 we can shorten the on-disk segment size. */
123 .sdata ${SDATA_START_ADDR} : {
124 ${RELOCATING+PROVIDE (__gp = . + 0x8000);}
125 *(.sdata)
126 ${RELOCATING+__sbss_start = .;}
127 *(.sbss)
128 *(.scommon)
129 }
130
131 /* See comment about .rozdata */
132 .rosdata ${ROSDATA_START_ADDR} : {
133 *(.rosdata)
134 }
135
136 ${RELOCATING+_edata = DEFINED (__sbss_start) ? __sbss_start : . ;}
137 ${RELOCATING+PROVIDE (edata = _edata);}
138
139 .bss :
140 {
141 ${RELOCATING+__bss_start = DEFINED (__sbss_start) ? __sbss_start : . ;}
142 *(.dynbss)
143 *(.bss)
144 *(COMMON)
145 }
146
147 ${RELOCATING+_end = . ;}
148 ${RELOCATING+PROVIDE (end = .);}
149
150 /* Stabs debugging sections. */
151 .stab 0 : { *(.stab) }
152 .stabstr 0 : { *(.stabstr) }
153 .stab.excl 0 : { *(.stab.excl) }
154 .stab.exclstr 0 : { *(.stab.exclstr) }
155 .stab.index 0 : { *(.stab.index) }
156 .stab.indexstr 0 : { *(.stab.indexstr) }
157 .comment 0 : { *(.comment) }
158
159 /* DWARF debug sections.
160 Symbols in the DWARF debugging sections are relative to the beginning
161 of the section so we begin them at 0. */
162
163 /* DWARF 1 */
164 .debug 0 : { *(.debug) }
165 .line 0 : { *(.line) }
166
167 /* GNU DWARF 1 extensions */
168 .debug_srcinfo 0 : { *(.debug_srcinfo) }
169 .debug_sfnames 0 : { *(.debug_sfnames) }
170
171 /* DWARF 1.1 and DWARF 2 */
172 .debug_aranges 0 : { *(.debug_aranges) }
173 .debug_pubnames 0 : { *(.debug_pubnames) }
174
175 /* DWARF 2 */
176 .debug_info 0 : { *(.debug_info) }
177 .debug_abbrev 0 : { *(.debug_abbrev) }
178 .debug_line 0 : { *(.debug_line) }
179 .debug_frame 0 : { *(.debug_frame) }
180 .debug_str 0 : { *(.debug_str) }
181 .debug_loc 0 : { *(.debug_loc) }
182 .debug_macinfo 0 : { *(.debug_macinfo) }
183
184 /* SGI/MIPS DWARF 2 extensions */
185 .debug_weaknames 0 : { *(.debug_weaknames) }
186 .debug_funcnames 0 : { *(.debug_funcnames) }
187 .debug_typenames 0 : { *(.debug_typenames) }
188 .debug_varnames 0 : { *(.debug_varnames) }
189
190 /* User stack */
191 .stack 0x200000 : {
192 ${RELOCATING+__stack = .;}
193 *(.stack)
194 }
195 /* These must appear regardless of . */
196 }
197 EOF