]>
Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* Target definitions for NN-bit ELF |
f0abc2a1 AM |
2 | Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
3 | 2003 Free Software Foundation, Inc. | |
252b5132 | 4 | |
5e8d7549 | 5 | This file is part of BFD, the Binary File Descriptor library. |
252b5132 | 6 | |
5e8d7549 NC |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 2 of the License, or | |
10 | (at your option) any later version. | |
252b5132 | 11 | |
5e8d7549 NC |
12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
252b5132 | 16 | |
5e8d7549 NC |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software | |
19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |
252b5132 RH |
20 | |
21 | /* This structure contains everything that BFD knows about a target. | |
22 | It includes things like its byte order, name, what routines to call | |
23 | to do various operations, etc. Every BFD points to a target structure | |
24 | with its "xvec" member. | |
25 | ||
26 | There are two such structures here: one for big-endian machines and | |
27 | one for little-endian machines. */ | |
28 | ||
29 | #define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup | |
30 | #define bfd_elfNN_bfd_free_cached_info _bfd_generic_bfd_free_cached_info | |
31 | #ifndef bfd_elfNN_get_section_contents | |
32 | #define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents | |
33 | #endif | |
34 | ||
35 | #define bfd_elfNN_canonicalize_dynamic_symtab _bfd_elf_canonicalize_dynamic_symtab | |
fee24f1c | 36 | #ifndef bfd_elfNN_canonicalize_reloc |
252b5132 | 37 | #define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc |
fee24f1c | 38 | #endif |
252b5132 RH |
39 | #ifndef bfd_elfNN_find_nearest_line |
40 | #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line | |
41 | #endif | |
42 | #define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols | |
43 | #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol | |
44 | #define bfd_elfNN_get_dynamic_symtab_upper_bound _bfd_elf_get_dynamic_symtab_upper_bound | |
45 | #define bfd_elfNN_get_lineno _bfd_elf_get_lineno | |
46 | #ifndef bfd_elfNN_get_reloc_upper_bound | |
47 | #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound | |
48 | #endif | |
7cdc5bba | 49 | #ifndef bfd_elfNN_get_symbol_info |
252b5132 | 50 | #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info |
7cdc5bba | 51 | #endif |
252b5132 RH |
52 | #define bfd_elfNN_get_symtab _bfd_elf_get_symtab |
53 | #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound | |
54 | #if 0 /* done in elf-bfd.h */ | |
55 | #define bfd_elfNN_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol | |
56 | #endif | |
57 | #define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol | |
f0abc2a1 | 58 | #ifndef bfd_elfNN_new_section_hook |
252b5132 | 59 | #define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook |
f0abc2a1 | 60 | #endif |
252b5132 RH |
61 | #define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach |
62 | #ifndef bfd_elfNN_set_section_contents | |
63 | #define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents | |
64 | #endif | |
65 | #define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers | |
66 | #define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents | |
67 | #define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents | |
68 | ||
69 | #define bfd_elfNN_get_section_contents_in_window \ | |
70 | _bfd_generic_get_section_contents_in_window | |
71 | ||
72 | #ifndef elf_backend_got_symbol_offset | |
73 | #define elf_backend_got_symbol_offset (bfd_vma) 0 | |
74 | #endif | |
3c3bdf30 NC |
75 | #ifndef elf_backend_can_refcount |
76 | #define elf_backend_can_refcount 0 | |
77 | #endif | |
252b5132 RH |
78 | #ifndef elf_backend_want_got_plt |
79 | #define elf_backend_want_got_plt 0 | |
80 | #endif | |
81 | #ifndef elf_backend_plt_readonly | |
82 | #define elf_backend_plt_readonly 0 | |
83 | #endif | |
84 | #ifndef elf_backend_want_plt_sym | |
85 | #define elf_backend_want_plt_sym 0 | |
86 | #endif | |
87 | #ifndef elf_backend_plt_not_loaded | |
88 | #define elf_backend_plt_not_loaded 0 | |
89 | #endif | |
90 | #ifndef elf_backend_plt_alignment | |
91 | #define elf_backend_plt_alignment 2 | |
92 | #endif | |
3018b441 RH |
93 | #ifndef elf_backend_want_dynbss |
94 | #define elf_backend_want_dynbss 1 | |
95 | #endif | |
5e8d7549 NC |
96 | #ifndef elf_backend_want_p_paddr_set_to_zero |
97 | #define elf_backend_want_p_paddr_set_to_zero 0 | |
98 | #endif | |
252b5132 RH |
99 | |
100 | #define bfd_elfNN_bfd_debug_info_start bfd_void | |
101 | #define bfd_elfNN_bfd_debug_info_end bfd_void | |
dc810e39 AM |
102 | #define bfd_elfNN_bfd_debug_info_accumulate \ |
103 | (void (*) PARAMS ((bfd*, struct sec *))) bfd_void | |
252b5132 RH |
104 | |
105 | #ifndef bfd_elfNN_bfd_get_relocated_section_contents | |
106 | #define bfd_elfNN_bfd_get_relocated_section_contents \ | |
107 | bfd_generic_get_relocated_section_contents | |
108 | #endif | |
109 | ||
110 | #ifndef bfd_elfNN_bfd_relax_section | |
111 | #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section | |
112 | #endif | |
113 | ||
114 | #ifndef elf_backend_can_gc_sections | |
115 | #define elf_backend_can_gc_sections 0 | |
116 | #endif | |
51b64d56 AM |
117 | #ifndef elf_backend_can_refcount |
118 | #define elf_backend_can_refcount 0 | |
119 | #endif | |
2517a57f AM |
120 | #ifndef elf_backend_want_got_sym |
121 | #define elf_backend_want_got_sym 1 | |
122 | #endif | |
252b5132 RH |
123 | #ifndef elf_backend_gc_mark_hook |
124 | #define elf_backend_gc_mark_hook NULL | |
125 | #endif | |
126 | #ifndef elf_backend_gc_sweep_hook | |
127 | #define elf_backend_gc_sweep_hook NULL | |
128 | #endif | |
129 | #ifndef bfd_elfNN_bfd_gc_sections | |
130 | #define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections | |
131 | #endif | |
132 | ||
8550eb6e JJ |
133 | #ifndef bfd_elfNN_bfd_merge_sections |
134 | #define bfd_elfNN_bfd_merge_sections \ | |
135 | _bfd_elf_merge_sections | |
136 | #endif | |
137 | ||
e61463e1 AM |
138 | #ifndef bfd_elfNN_bfd_discard_group |
139 | #define bfd_elfNN_bfd_discard_group bfd_elf_discard_group | |
140 | #endif | |
141 | ||
d1cf510e | 142 | #ifndef bfd_elfNN_bfd_make_debug_symbol |
252b5132 RH |
143 | #define bfd_elfNN_bfd_make_debug_symbol \ |
144 | ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr) | |
d1cf510e | 145 | #endif |
252b5132 RH |
146 | |
147 | #ifndef bfd_elfNN_bfd_copy_private_symbol_data | |
148 | #define bfd_elfNN_bfd_copy_private_symbol_data \ | |
149 | _bfd_elf_copy_private_symbol_data | |
150 | #endif | |
151 | ||
152 | #ifndef bfd_elfNN_bfd_copy_private_section_data | |
153 | #define bfd_elfNN_bfd_copy_private_section_data \ | |
154 | _bfd_elf_copy_private_section_data | |
155 | #endif | |
156 | #ifndef bfd_elfNN_bfd_copy_private_bfd_data | |
157 | #define bfd_elfNN_bfd_copy_private_bfd_data \ | |
2d502050 | 158 | _bfd_elf_copy_private_bfd_data |
252b5132 RH |
159 | #endif |
160 | #ifndef bfd_elfNN_bfd_print_private_bfd_data | |
161 | #define bfd_elfNN_bfd_print_private_bfd_data \ | |
162 | _bfd_elf_print_private_bfd_data | |
163 | #endif | |
164 | #ifndef bfd_elfNN_bfd_merge_private_bfd_data | |
165 | #define bfd_elfNN_bfd_merge_private_bfd_data \ | |
b34976b6 | 166 | ((bfd_boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) |
252b5132 RH |
167 | #endif |
168 | #ifndef bfd_elfNN_bfd_set_private_flags | |
169 | #define bfd_elfNN_bfd_set_private_flags \ | |
b34976b6 | 170 | ((bfd_boolean (*) PARAMS ((bfd *, flagword))) bfd_true) |
252b5132 RH |
171 | #endif |
172 | #ifndef bfd_elfNN_bfd_is_local_label_name | |
173 | #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name | |
174 | #endif | |
175 | ||
176 | #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound | |
177 | #define bfd_elfNN_get_dynamic_reloc_upper_bound \ | |
178 | _bfd_elf_get_dynamic_reloc_upper_bound | |
179 | #endif | |
180 | #ifndef bfd_elfNN_canonicalize_dynamic_reloc | |
181 | #define bfd_elfNN_canonicalize_dynamic_reloc \ | |
182 | _bfd_elf_canonicalize_dynamic_reloc | |
183 | #endif | |
184 | ||
e2d34d7d DJ |
185 | #ifndef bfd_elfNN_bfd_link_hash_table_free |
186 | #define bfd_elfNN_bfd_link_hash_table_free _bfd_generic_link_hash_table_free | |
187 | #endif | |
188 | ||
8ea2e4bd | 189 | #ifdef elf_backend_relocate_section |
252b5132 RH |
190 | #ifndef bfd_elfNN_bfd_link_hash_table_create |
191 | #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create | |
192 | #endif | |
8ea2e4bd NC |
193 | #else /* ! defined (elf_backend_relocate_section) */ |
194 | /* If no backend relocate_section routine, use the generic linker. | |
195 | Note - this will prevent the port from being able to use some of | |
196 | the other features of the ELF linker, because the generic hash structure | |
197 | does not have the fields needed by the ELF linker. In particular it | |
198 | means that linking directly to S-records will not work. */ | |
199 | #ifndef bfd_elfNN_bfd_link_hash_table_create | |
200 | #define bfd_elfNN_bfd_link_hash_table_create \ | |
201 | _bfd_generic_link_hash_table_create | |
202 | #endif | |
252b5132 RH |
203 | #ifndef bfd_elfNN_bfd_link_add_symbols |
204 | #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols | |
205 | #endif | |
206 | #ifndef bfd_elfNN_bfd_final_link | |
207 | #define bfd_elfNN_bfd_final_link _bfd_generic_final_link | |
208 | #endif | |
209 | #endif /* ! defined (elf_backend_relocate_section) */ | |
2d653fc7 AM |
210 | |
211 | #ifndef bfd_elfNN_bfd_link_just_syms | |
212 | #define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms | |
213 | #endif | |
214 | ||
252b5132 RH |
215 | #ifndef bfd_elfNN_bfd_link_split_section |
216 | #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section | |
217 | #endif | |
218 | ||
219 | #ifndef bfd_elfNN_archive_p | |
220 | #define bfd_elfNN_archive_p bfd_generic_archive_p | |
221 | #endif | |
222 | ||
223 | #ifndef bfd_elfNN_write_archive_contents | |
224 | #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents | |
225 | #endif | |
226 | ||
227 | #ifndef bfd_elfNN_mkobject | |
228 | #define bfd_elfNN_mkobject bfd_elf_mkobject | |
229 | #endif | |
230 | ||
231 | #ifndef bfd_elfNN_mkcorefile | |
232 | #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile | |
233 | #endif | |
234 | ||
235 | #ifndef bfd_elfNN_mkarchive | |
236 | #define bfd_elfNN_mkarchive _bfd_generic_mkarchive | |
237 | #endif | |
238 | ||
239 | #ifndef elf_symbol_leading_char | |
240 | #define elf_symbol_leading_char 0 | |
241 | #endif | |
242 | ||
243 | #ifndef elf_info_to_howto | |
244 | #define elf_info_to_howto 0 | |
245 | #endif | |
246 | ||
247 | #ifndef elf_info_to_howto_rel | |
248 | #define elf_info_to_howto_rel 0 | |
249 | #endif | |
250 | ||
251 | #ifndef ELF_MAXPAGESIZE | |
79e5982f NC |
252 | #error ELF_MAXPAGESIZE is not defined |
253 | #define ELF_MAXPAGESIZE 1 | |
252b5132 RH |
254 | #endif |
255 | ||
256 | #ifndef elf_backend_collect | |
b34976b6 | 257 | #define elf_backend_collect FALSE |
252b5132 RH |
258 | #endif |
259 | #ifndef elf_backend_type_change_ok | |
b34976b6 | 260 | #define elf_backend_type_change_ok FALSE |
252b5132 RH |
261 | #endif |
262 | ||
263 | #ifndef elf_backend_sym_is_global | |
264 | #define elf_backend_sym_is_global 0 | |
265 | #endif | |
266 | #ifndef elf_backend_object_p | |
267 | #define elf_backend_object_p 0 | |
268 | #endif | |
269 | #ifndef elf_backend_symbol_processing | |
270 | #define elf_backend_symbol_processing 0 | |
271 | #endif | |
272 | #ifndef elf_backend_symbol_table_processing | |
273 | #define elf_backend_symbol_table_processing 0 | |
274 | #endif | |
275 | #ifndef elf_backend_get_symbol_type | |
276 | #define elf_backend_get_symbol_type 0 | |
277 | #endif | |
278 | #ifndef elf_backend_section_processing | |
279 | #define elf_backend_section_processing 0 | |
280 | #endif | |
281 | #ifndef elf_backend_section_from_shdr | |
282 | #define elf_backend_section_from_shdr 0 | |
283 | #endif | |
fa152c49 JW |
284 | #ifndef elf_backend_section_flags |
285 | #define elf_backend_section_flags 0 | |
286 | #endif | |
20cfcaae NC |
287 | #ifndef elf_backend_section_from_phdr |
288 | #define elf_backend_section_from_phdr 0 | |
289 | #endif | |
252b5132 RH |
290 | #ifndef elf_backend_fake_sections |
291 | #define elf_backend_fake_sections 0 | |
292 | #endif | |
293 | #ifndef elf_backend_section_from_bfd_section | |
294 | #define elf_backend_section_from_bfd_section 0 | |
295 | #endif | |
296 | #ifndef elf_backend_add_symbol_hook | |
297 | #define elf_backend_add_symbol_hook 0 | |
298 | #endif | |
299 | #ifndef elf_backend_link_output_symbol_hook | |
300 | #define elf_backend_link_output_symbol_hook 0 | |
301 | #endif | |
302 | #ifndef elf_backend_create_dynamic_sections | |
303 | #define elf_backend_create_dynamic_sections 0 | |
304 | #endif | |
305 | #ifndef elf_backend_check_relocs | |
306 | #define elf_backend_check_relocs 0 | |
307 | #endif | |
308 | #ifndef elf_backend_adjust_dynamic_symbol | |
309 | #define elf_backend_adjust_dynamic_symbol 0 | |
310 | #endif | |
311 | #ifndef elf_backend_always_size_sections | |
312 | #define elf_backend_always_size_sections 0 | |
313 | #endif | |
314 | #ifndef elf_backend_size_dynamic_sections | |
315 | #define elf_backend_size_dynamic_sections 0 | |
316 | #endif | |
317 | #ifndef elf_backend_relocate_section | |
318 | #define elf_backend_relocate_section 0 | |
319 | #endif | |
320 | #ifndef elf_backend_finish_dynamic_symbol | |
321 | #define elf_backend_finish_dynamic_symbol 0 | |
322 | #endif | |
323 | #ifndef elf_backend_finish_dynamic_sections | |
324 | #define elf_backend_finish_dynamic_sections 0 | |
325 | #endif | |
326 | #ifndef elf_backend_begin_write_processing | |
327 | #define elf_backend_begin_write_processing 0 | |
328 | #endif | |
329 | #ifndef elf_backend_final_write_processing | |
330 | #define elf_backend_final_write_processing 0 | |
331 | #endif | |
332 | #ifndef elf_backend_additional_program_headers | |
333 | #define elf_backend_additional_program_headers 0 | |
334 | #endif | |
335 | #ifndef elf_backend_modify_segment_map | |
336 | #define elf_backend_modify_segment_map 0 | |
337 | #endif | |
338 | #ifndef elf_backend_ecoff_debug_swap | |
339 | #define elf_backend_ecoff_debug_swap 0 | |
340 | #endif | |
341 | #ifndef elf_backend_got_header_size | |
342 | #define elf_backend_got_header_size 0 | |
343 | #endif | |
344 | #ifndef elf_backend_plt_header_size | |
345 | #define elf_backend_plt_header_size 0 | |
346 | #endif | |
e6c51ed4 NC |
347 | #ifndef elf_backend_post_process_headers |
348 | #define elf_backend_post_process_headers NULL | |
349 | #endif | |
587ff49e RH |
350 | #ifndef elf_backend_print_symbol_all |
351 | #define elf_backend_print_symbol_all NULL | |
352 | #endif | |
353 | #ifndef elf_backend_output_arch_syms | |
354 | #define elf_backend_output_arch_syms NULL | |
355 | #endif | |
c61b8717 RH |
356 | #ifndef elf_backend_copy_indirect_symbol |
357 | #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect | |
358 | #endif | |
359 | #ifndef elf_backend_hide_symbol | |
360 | #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol | |
361 | #endif | |
9317eacc CM |
362 | #ifndef elf_backend_emit_relocs |
363 | #define elf_backend_emit_relocs NULL | |
364 | #endif | |
365 | #ifndef elf_backend_count_relocs | |
366 | #define elf_backend_count_relocs NULL | |
367 | #endif | |
bb0082d6 AM |
368 | #ifndef elf_backend_grok_prstatus |
369 | #define elf_backend_grok_prstatus NULL | |
370 | #endif | |
371 | #ifndef elf_backend_grok_psinfo | |
372 | #define elf_backend_grok_psinfo NULL | |
373 | #endif | |
4e771d61 NC |
374 | #ifndef elf_backend_sprintf_vma |
375 | #define elf_backend_sprintf_vma _bfd_elf_sprintf_vma | |
376 | #endif | |
377 | #ifndef elf_backend_fprintf_vma | |
378 | #define elf_backend_fprintf_vma _bfd_elf_fprintf_vma | |
379 | #endif | |
db6751f2 JJ |
380 | #ifndef elf_backend_reloc_type_class |
381 | #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class | |
382 | #endif | |
73d074b4 DJ |
383 | #ifndef elf_backend_discard_info |
384 | #define elf_backend_discard_info NULL | |
385 | #endif | |
386 | #ifndef elf_backend_ignore_discarded_relocs | |
387 | #define elf_backend_ignore_discarded_relocs NULL | |
388 | #endif | |
389 | #ifndef elf_backend_write_section | |
390 | #define elf_backend_write_section NULL | |
391 | #endif | |
c6e90b02 TS |
392 | #ifndef elf_backend_mips_irix_compat |
393 | #define elf_backend_mips_irix_compat NULL | |
394 | #endif | |
395 | #ifndef elf_backend_mips_rtype_to_howto | |
396 | #define elf_backend_mips_rtype_to_howto NULL | |
397 | #endif | |
c61b8717 | 398 | |
bf572ba0 MM |
399 | /* Previously, backends could only use SHT_REL or SHT_RELA relocation |
400 | sections, but not both. They defined USE_REL to indicate SHT_REL | |
401 | sections, and left it undefined to indicated SHT_RELA sections. | |
402 | For backwards compatibility, we still support this usage. */ | |
403 | #ifndef USE_REL | |
404 | #define USE_REL 0 | |
3e932841 | 405 | #endif |
bf572ba0 MM |
406 | |
407 | /* Use these in new code. */ | |
3e932841 | 408 | #ifndef elf_backend_may_use_rel_p |
bf572ba0 | 409 | #define elf_backend_may_use_rel_p USE_REL |
3e932841 | 410 | #endif |
bf572ba0 MM |
411 | #ifndef elf_backend_may_use_rela_p |
412 | #define elf_backend_may_use_rela_p !USE_REL | |
413 | #endif | |
3e932841 | 414 | #ifndef elf_backend_default_use_rela_p |
bf572ba0 MM |
415 | #define elf_backend_default_use_rela_p !USE_REL |
416 | #endif | |
417 | ||
b491616a AM |
418 | #ifndef elf_backend_rela_normal |
419 | #define elf_backend_rela_normal 0 | |
420 | #endif | |
421 | ||
252b5132 RH |
422 | #ifndef ELF_MACHINE_ALT1 |
423 | #define ELF_MACHINE_ALT1 0 | |
424 | #endif | |
425 | ||
426 | #ifndef ELF_MACHINE_ALT2 | |
427 | #define ELF_MACHINE_ALT2 0 | |
428 | #endif | |
429 | ||
430 | #ifndef elf_backend_size_info | |
431 | #define elf_backend_size_info _bfd_elfNN_size_info | |
432 | #endif | |
433 | ||
86dc0f79 RH |
434 | #ifndef elf_backend_sign_extend_vma |
435 | #define elf_backend_sign_extend_vma 0 | |
436 | #endif | |
437 | ||
252b5132 RH |
438 | extern const struct elf_size_info _bfd_elfNN_size_info; |
439 | ||
dd745cfa | 440 | #ifndef INCLUDED_TARGET_FILE |
dc810e39 | 441 | static const struct elf_backend_data elfNN_bed = |
252b5132 | 442 | { |
252b5132 RH |
443 | ELF_ARCH, /* arch */ |
444 | ELF_MACHINE_CODE, /* elf_machine_code */ | |
445 | ELF_MAXPAGESIZE, /* maxpagesize */ | |
252b5132 RH |
446 | elf_info_to_howto, |
447 | elf_info_to_howto_rel, | |
448 | elf_backend_sym_is_global, | |
449 | elf_backend_object_p, | |
450 | elf_backend_symbol_processing, | |
451 | elf_backend_symbol_table_processing, | |
452 | elf_backend_get_symbol_type, | |
453 | elf_backend_section_processing, | |
454 | elf_backend_section_from_shdr, | |
fa152c49 | 455 | elf_backend_section_flags, |
20cfcaae | 456 | elf_backend_section_from_phdr, |
252b5132 RH |
457 | elf_backend_fake_sections, |
458 | elf_backend_section_from_bfd_section, | |
459 | elf_backend_add_symbol_hook, | |
460 | elf_backend_link_output_symbol_hook, | |
461 | elf_backend_create_dynamic_sections, | |
462 | elf_backend_check_relocs, | |
463 | elf_backend_adjust_dynamic_symbol, | |
464 | elf_backend_always_size_sections, | |
465 | elf_backend_size_dynamic_sections, | |
466 | elf_backend_relocate_section, | |
467 | elf_backend_finish_dynamic_symbol, | |
468 | elf_backend_finish_dynamic_sections, | |
469 | elf_backend_begin_write_processing, | |
470 | elf_backend_final_write_processing, | |
471 | elf_backend_additional_program_headers, | |
472 | elf_backend_modify_segment_map, | |
473 | elf_backend_gc_mark_hook, | |
474 | elf_backend_gc_sweep_hook, | |
e6c51ed4 | 475 | elf_backend_post_process_headers, |
587ff49e RH |
476 | elf_backend_print_symbol_all, |
477 | elf_backend_output_arch_syms, | |
c61b8717 RH |
478 | elf_backend_copy_indirect_symbol, |
479 | elf_backend_hide_symbol, | |
9317eacc CM |
480 | elf_backend_emit_relocs, |
481 | elf_backend_count_relocs, | |
bb0082d6 AM |
482 | elf_backend_grok_prstatus, |
483 | elf_backend_grok_psinfo, | |
4e771d61 NC |
484 | elf_backend_sprintf_vma, |
485 | elf_backend_fprintf_vma, | |
db6751f2 | 486 | elf_backend_reloc_type_class, |
73d074b4 DJ |
487 | elf_backend_discard_info, |
488 | elf_backend_ignore_discarded_relocs, | |
489 | elf_backend_write_section, | |
c6e90b02 TS |
490 | elf_backend_mips_irix_compat, |
491 | elf_backend_mips_rtype_to_howto, | |
252b5132 RH |
492 | elf_backend_ecoff_debug_swap, |
493 | ELF_MACHINE_ALT1, | |
494 | ELF_MACHINE_ALT2, | |
495 | &elf_backend_size_info, | |
496 | elf_backend_got_symbol_offset, | |
497 | elf_backend_got_header_size, | |
498 | elf_backend_plt_header_size, | |
86dc0f79 RH |
499 | elf_backend_collect, |
500 | elf_backend_type_change_ok, | |
bf572ba0 MM |
501 | elf_backend_may_use_rel_p, |
502 | elf_backend_may_use_rela_p, | |
503 | elf_backend_default_use_rela_p, | |
b491616a | 504 | elf_backend_rela_normal, |
86dc0f79 | 505 | elf_backend_sign_extend_vma, |
252b5132 RH |
506 | elf_backend_want_got_plt, |
507 | elf_backend_plt_readonly, | |
508 | elf_backend_want_plt_sym, | |
509 | elf_backend_plt_not_loaded, | |
510 | elf_backend_plt_alignment, | |
2ac8ce5f | 511 | elf_backend_can_gc_sections, |
51b64d56 | 512 | elf_backend_can_refcount, |
7fda6dbc | 513 | elf_backend_want_got_sym, |
5e8d7549 NC |
514 | elf_backend_want_dynbss, |
515 | elf_backend_want_p_paddr_set_to_zero | |
252b5132 | 516 | }; |
dd745cfa | 517 | #endif |
252b5132 | 518 | |
c3c89269 NC |
519 | /* Forward declaration for use when initialising alternative_target field. */ |
520 | #ifdef TARGET_LITTLE_SYM | |
521 | extern const bfd_target TARGET_LITTLE_SYM; | |
522 | #endif | |
523 | ||
252b5132 RH |
524 | #ifdef TARGET_BIG_SYM |
525 | const bfd_target TARGET_BIG_SYM = | |
526 | { | |
527 | /* name: identify kind of target */ | |
528 | TARGET_BIG_NAME, | |
529 | ||
530 | /* flavour: general indication about file */ | |
531 | bfd_target_elf_flavour, | |
532 | ||
533 | /* byteorder: data is big endian */ | |
534 | BFD_ENDIAN_BIG, | |
535 | ||
536 | /* header_byteorder: header is also big endian */ | |
537 | BFD_ENDIAN_BIG, | |
538 | ||
539 | /* object_flags: mask of all file flags */ | |
e0aae569 RH |
540 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
541 | | DYNAMIC | WP_TEXT | D_PAGED), | |
252b5132 RH |
542 | |
543 | /* section_flags: mask of all section flags */ | |
e0aae569 RH |
544 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
545 | | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES | |
dbb410c3 | 546 | | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), |
252b5132 RH |
547 | |
548 | /* leading_symbol_char: is the first char of a user symbol | |
549 | predictable, and if so what is it */ | |
550 | elf_symbol_leading_char, | |
551 | ||
552 | /* ar_pad_char: pad character for filenames within an archive header | |
553 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
554 | of the archiver and/or os and should be independently tunable */ | |
555 | '/', | |
556 | ||
557 | /* ar_max_namelen: maximum number of characters in an archive header | |
558 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
a1aefc76 NC |
559 | of the archiver and should be independently tunable. The System V ABI, |
560 | Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ | |
561 | 15, | |
252b5132 RH |
562 | |
563 | /* Routines to byte-swap various sized integers from the data sections */ | |
564 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, | |
565 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
566 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
567 | ||
568 | /* Routines to byte-swap various sized integers from the file headers */ | |
569 | bfd_getb64, bfd_getb_signed_64, bfd_putb64, | |
570 | bfd_getb32, bfd_getb_signed_32, bfd_putb32, | |
571 | bfd_getb16, bfd_getb_signed_16, bfd_putb16, | |
572 | ||
573 | /* bfd_check_format: check the format of a file being read */ | |
574 | { _bfd_dummy_target, /* unknown format */ | |
575 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ | |
576 | bfd_elfNN_archive_p, /* an archive */ | |
577 | bfd_elfNN_core_file_p /* a core file */ | |
578 | }, | |
579 | ||
580 | /* bfd_set_format: set the format of a file being written */ | |
581 | { bfd_false, | |
582 | bfd_elfNN_mkobject, | |
583 | bfd_elfNN_mkarchive, | |
584 | bfd_elfNN_mkcorefile | |
585 | }, | |
586 | ||
587 | /* bfd_write_contents: write cached information into a file being written */ | |
588 | { bfd_false, | |
589 | bfd_elfNN_write_object_contents, | |
590 | bfd_elfNN_write_archive_contents, | |
591 | bfd_elfNN_write_corefile_contents, | |
592 | }, | |
593 | ||
594 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), | |
595 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
596 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
597 | #ifdef bfd_elfNN_archive_functions | |
598 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), | |
599 | #else | |
600 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), | |
601 | #endif | |
602 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), | |
603 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
604 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
605 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
606 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
607 | ||
c3c89269 NC |
608 | /* Alternative endian target. */ |
609 | #ifdef TARGET_LITTLE_SYM | |
610 | & TARGET_LITTLE_SYM, | |
611 | #else | |
612 | NULL, | |
613 | #endif | |
614 | ||
252b5132 | 615 | /* backend_data: */ |
c3c89269 | 616 | (PTR) &elfNN_bed |
252b5132 RH |
617 | }; |
618 | #endif | |
619 | ||
620 | #ifdef TARGET_LITTLE_SYM | |
621 | const bfd_target TARGET_LITTLE_SYM = | |
622 | { | |
623 | /* name: identify kind of target */ | |
624 | TARGET_LITTLE_NAME, | |
625 | ||
626 | /* flavour: general indication about file */ | |
627 | bfd_target_elf_flavour, | |
628 | ||
629 | /* byteorder: data is little endian */ | |
630 | BFD_ENDIAN_LITTLE, | |
631 | ||
632 | /* header_byteorder: header is also little endian */ | |
633 | BFD_ENDIAN_LITTLE, | |
634 | ||
635 | /* object_flags: mask of all file flags */ | |
e0aae569 RH |
636 | (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
637 | | DYNAMIC | WP_TEXT | D_PAGED), | |
252b5132 RH |
638 | |
639 | /* section_flags: mask of all section flags */ | |
e0aae569 RH |
640 | (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
641 | | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES | |
dbb410c3 | 642 | | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP), |
252b5132 RH |
643 | |
644 | /* leading_symbol_char: is the first char of a user symbol | |
645 | predictable, and if so what is it */ | |
646 | elf_symbol_leading_char, | |
647 | ||
648 | /* ar_pad_char: pad character for filenames within an archive header | |
649 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
650 | of the archiver and/or os and should be independently tunable */ | |
651 | '/', | |
652 | ||
653 | /* ar_max_namelen: maximum number of characters in an archive header | |
654 | FIXME: this really has nothing to do with ELF, this is a characteristic | |
a1aefc76 NC |
655 | of the archiver and should be independently tunable. The System V ABI, |
656 | Chapter 7 (Formats & Protocols), Archive section sets this as 15. */ | |
657 | 15, | |
252b5132 RH |
658 | |
659 | /* Routines to byte-swap various sized integers from the data sections */ | |
660 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, | |
661 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
662 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
663 | ||
664 | /* Routines to byte-swap various sized integers from the file headers */ | |
665 | bfd_getl64, bfd_getl_signed_64, bfd_putl64, | |
666 | bfd_getl32, bfd_getl_signed_32, bfd_putl32, | |
667 | bfd_getl16, bfd_getl_signed_16, bfd_putl16, | |
668 | ||
669 | /* bfd_check_format: check the format of a file being read */ | |
670 | { _bfd_dummy_target, /* unknown format */ | |
671 | bfd_elfNN_object_p, /* assembler/linker output (object file) */ | |
672 | bfd_elfNN_archive_p, /* an archive */ | |
673 | bfd_elfNN_core_file_p /* a core file */ | |
674 | }, | |
675 | ||
676 | /* bfd_set_format: set the format of a file being written */ | |
677 | { bfd_false, | |
678 | bfd_elfNN_mkobject, | |
679 | bfd_elfNN_mkarchive, | |
680 | bfd_elfNN_mkcorefile | |
681 | }, | |
682 | ||
683 | /* bfd_write_contents: write cached information into a file being written */ | |
684 | { bfd_false, | |
685 | bfd_elfNN_write_object_contents, | |
686 | bfd_elfNN_write_archive_contents, | |
687 | bfd_elfNN_write_corefile_contents, | |
688 | }, | |
689 | ||
690 | BFD_JUMP_TABLE_GENERIC (bfd_elfNN), | |
691 | BFD_JUMP_TABLE_COPY (bfd_elfNN), | |
692 | BFD_JUMP_TABLE_CORE (bfd_elfNN), | |
693 | #ifdef bfd_elfNN_archive_functions | |
694 | BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive), | |
695 | #else | |
696 | BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), | |
697 | #endif | |
698 | BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN), | |
699 | BFD_JUMP_TABLE_RELOCS (bfd_elfNN), | |
700 | BFD_JUMP_TABLE_WRITE (bfd_elfNN), | |
701 | BFD_JUMP_TABLE_LINK (bfd_elfNN), | |
702 | BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN), | |
703 | ||
c3c89269 NC |
704 | /* Alternative endian target. */ |
705 | #ifdef TARGET_BIG_SYM | |
706 | & TARGET_BIG_SYM, | |
707 | #else | |
708 | NULL, | |
709 | #endif | |
3e932841 | 710 | |
252b5132 | 711 | /* backend_data: */ |
c3c89269 | 712 | (PTR) &elfNN_bed |
252b5132 RH |
713 | }; |
714 | #endif |