Apply H.J.'s patch to revert change to elfxx-target.h
[deliverable/binutils-gdb.git] / bfd / elfxx-target.h
1 /* Target definitions for NN-bit ELF
2 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
3 Free Software Foundation, Inc.
4
5 This file is part of BFD, the Binary File Descriptor library.
6
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.
11
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.
16
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. */
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
36 #define bfd_elfNN_canonicalize_reloc _bfd_elf_canonicalize_reloc
37 #ifndef bfd_elfNN_find_nearest_line
38 #define bfd_elfNN_find_nearest_line _bfd_elf_find_nearest_line
39 #endif
40 #define bfd_elfNN_read_minisymbols _bfd_elf_read_minisymbols
41 #define bfd_elfNN_minisymbol_to_symbol _bfd_elf_minisymbol_to_symbol
42 #define bfd_elfNN_get_dynamic_symtab_upper_bound _bfd_elf_get_dynamic_symtab_upper_bound
43 #define bfd_elfNN_get_lineno _bfd_elf_get_lineno
44 #ifndef bfd_elfNN_get_reloc_upper_bound
45 #define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
46 #endif
47 #define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info
48 #define bfd_elfNN_get_symtab _bfd_elf_get_symtab
49 #define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
50 #if 0 /* done in elf-bfd.h */
51 #define bfd_elfNN_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
52 #endif
53 #define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol
54 #define bfd_elfNN_new_section_hook _bfd_elf_new_section_hook
55 #define bfd_elfNN_set_arch_mach _bfd_elf_set_arch_mach
56 #ifndef bfd_elfNN_set_section_contents
57 #define bfd_elfNN_set_section_contents _bfd_elf_set_section_contents
58 #endif
59 #define bfd_elfNN_sizeof_headers _bfd_elf_sizeof_headers
60 #define bfd_elfNN_write_object_contents _bfd_elf_write_object_contents
61 #define bfd_elfNN_write_corefile_contents _bfd_elf_write_corefile_contents
62
63 #define bfd_elfNN_get_section_contents_in_window \
64 _bfd_generic_get_section_contents_in_window
65
66 #ifndef elf_backend_got_symbol_offset
67 #define elf_backend_got_symbol_offset (bfd_vma) 0
68 #endif
69 #ifndef elf_backend_want_got_plt
70 #define elf_backend_want_got_plt 0
71 #endif
72 #ifndef elf_backend_plt_readonly
73 #define elf_backend_plt_readonly 0
74 #endif
75 #ifndef elf_backend_want_plt_sym
76 #define elf_backend_want_plt_sym 0
77 #endif
78 #ifndef elf_backend_plt_not_loaded
79 #define elf_backend_plt_not_loaded 0
80 #endif
81 #ifndef elf_backend_plt_alignment
82 #define elf_backend_plt_alignment 2
83 #endif
84 #ifndef elf_backend_want_dynbss
85 #define elf_backend_want_dynbss 1
86 #endif
87
88 #define bfd_elfNN_bfd_debug_info_start bfd_void
89 #define bfd_elfNN_bfd_debug_info_end bfd_void
90 #define bfd_elfNN_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
91
92 #ifndef bfd_elfNN_bfd_get_relocated_section_contents
93 #define bfd_elfNN_bfd_get_relocated_section_contents \
94 bfd_generic_get_relocated_section_contents
95 #endif
96
97 #ifndef bfd_elfNN_bfd_relax_section
98 #define bfd_elfNN_bfd_relax_section bfd_generic_relax_section
99 #endif
100
101 #ifndef elf_backend_can_gc_sections
102 #define elf_backend_can_gc_sections 0
103 #endif
104 #ifndef elf_backend_want_got_sym
105 #define elf_backend_want_got_sym 1
106 #endif
107 #ifndef elf_backend_gc_mark_hook
108 #define elf_backend_gc_mark_hook NULL
109 #endif
110 #ifndef elf_backend_gc_sweep_hook
111 #define elf_backend_gc_sweep_hook NULL
112 #endif
113 #ifndef bfd_elfNN_bfd_gc_sections
114 #define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections
115 #endif
116
117 #ifndef bfd_elfNN_bfd_merge_sections
118 #define bfd_elfNN_bfd_merge_sections \
119 _bfd_elf_merge_sections
120 #endif
121
122 #ifndef bfd_elfNN_bfd_make_debug_symbol
123 #define bfd_elfNN_bfd_make_debug_symbol \
124 ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
125 #endif
126
127 #ifndef bfd_elfNN_bfd_copy_private_symbol_data
128 #define bfd_elfNN_bfd_copy_private_symbol_data \
129 _bfd_elf_copy_private_symbol_data
130 #endif
131
132 #ifndef bfd_elfNN_bfd_copy_private_section_data
133 #define bfd_elfNN_bfd_copy_private_section_data \
134 _bfd_elf_copy_private_section_data
135 #endif
136 #ifndef bfd_elfNN_bfd_copy_private_bfd_data
137 #define bfd_elfNN_bfd_copy_private_bfd_data \
138 ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
139 #endif
140 #ifndef bfd_elfNN_bfd_print_private_bfd_data
141 #define bfd_elfNN_bfd_print_private_bfd_data \
142 _bfd_elf_print_private_bfd_data
143 #endif
144 #ifndef bfd_elfNN_bfd_merge_private_bfd_data
145 #define bfd_elfNN_bfd_merge_private_bfd_data \
146 ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
147 #endif
148 #ifndef bfd_elfNN_bfd_set_private_flags
149 #define bfd_elfNN_bfd_set_private_flags \
150 ((boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
151 #endif
152 #ifndef bfd_elfNN_bfd_is_local_label_name
153 #define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
154 #endif
155
156 #ifndef bfd_elfNN_get_dynamic_reloc_upper_bound
157 #define bfd_elfNN_get_dynamic_reloc_upper_bound \
158 _bfd_elf_get_dynamic_reloc_upper_bound
159 #endif
160 #ifndef bfd_elfNN_canonicalize_dynamic_reloc
161 #define bfd_elfNN_canonicalize_dynamic_reloc \
162 _bfd_elf_canonicalize_dynamic_reloc
163 #endif
164
165 #ifdef elf_backend_relocate_section
166 #ifndef bfd_elfNN_bfd_link_hash_table_create
167 #define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
168 #endif
169 #else /* ! defined (elf_backend_relocate_section) */
170 /* If no backend relocate_section routine, use the generic linker.
171 Note - this will prevent the port from being able to use some of
172 the other features of the ELF linker, because the generic hash structure
173 does not have the fields needed by the ELF linker. In particular it
174 means that linking directly to S-records will not work. */
175 #ifndef bfd_elfNN_bfd_link_hash_table_create
176 #define bfd_elfNN_bfd_link_hash_table_create \
177 _bfd_generic_link_hash_table_create
178 #endif
179 #ifndef bfd_elfNN_bfd_link_add_symbols
180 #define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
181 #endif
182 #ifndef bfd_elfNN_bfd_final_link
183 #define bfd_elfNN_bfd_final_link _bfd_generic_final_link
184 #endif
185 #endif /* ! defined (elf_backend_relocate_section) */
186 #ifndef bfd_elfNN_bfd_link_split_section
187 #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
188 #endif
189
190 #ifndef bfd_elfNN_archive_p
191 #define bfd_elfNN_archive_p bfd_generic_archive_p
192 #endif
193
194 #ifndef bfd_elfNN_write_archive_contents
195 #define bfd_elfNN_write_archive_contents _bfd_write_archive_contents
196 #endif
197
198 #ifndef bfd_elfNN_mkobject
199 #define bfd_elfNN_mkobject bfd_elf_mkobject
200 #endif
201
202 #ifndef bfd_elfNN_mkcorefile
203 #define bfd_elfNN_mkcorefile bfd_elf_mkcorefile
204 #endif
205
206 #ifndef bfd_elfNN_mkarchive
207 #define bfd_elfNN_mkarchive _bfd_generic_mkarchive
208 #endif
209
210 #ifndef elf_symbol_leading_char
211 #define elf_symbol_leading_char 0
212 #endif
213
214 #ifndef elf_info_to_howto
215 #define elf_info_to_howto 0
216 #endif
217
218 #ifndef elf_info_to_howto_rel
219 #define elf_info_to_howto_rel 0
220 #endif
221
222 #ifndef ELF_MAXPAGESIZE
223 #error ELF_MAXPAGESIZE is not defined
224 #define ELF_MAXPAGESIZE 1
225 #endif
226
227 #ifndef elf_backend_collect
228 #define elf_backend_collect false
229 #endif
230 #ifndef elf_backend_type_change_ok
231 #define elf_backend_type_change_ok false
232 #endif
233
234 #ifndef elf_backend_sym_is_global
235 #define elf_backend_sym_is_global 0
236 #endif
237 #ifndef elf_backend_object_p
238 #define elf_backend_object_p 0
239 #endif
240 #ifndef elf_backend_symbol_processing
241 #define elf_backend_symbol_processing 0
242 #endif
243 #ifndef elf_backend_symbol_table_processing
244 #define elf_backend_symbol_table_processing 0
245 #endif
246 #ifndef elf_backend_get_symbol_type
247 #define elf_backend_get_symbol_type 0
248 #endif
249 #ifndef elf_backend_section_processing
250 #define elf_backend_section_processing 0
251 #endif
252 #ifndef elf_backend_section_from_shdr
253 #define elf_backend_section_from_shdr 0
254 #endif
255 #ifndef elf_backend_section_flags
256 #define elf_backend_section_flags 0
257 #endif
258 #ifndef elf_backend_section_from_phdr
259 #define elf_backend_section_from_phdr 0
260 #endif
261 #ifndef elf_backend_fake_sections
262 #define elf_backend_fake_sections 0
263 #endif
264 #ifndef elf_backend_section_from_bfd_section
265 #define elf_backend_section_from_bfd_section 0
266 #endif
267 #ifndef elf_backend_add_symbol_hook
268 #define elf_backend_add_symbol_hook 0
269 #endif
270 #ifndef elf_backend_link_output_symbol_hook
271 #define elf_backend_link_output_symbol_hook 0
272 #endif
273 #ifndef elf_backend_create_dynamic_sections
274 #define elf_backend_create_dynamic_sections 0
275 #endif
276 #ifndef elf_backend_check_relocs
277 #define elf_backend_check_relocs 0
278 #endif
279 #ifndef elf_backend_adjust_dynamic_symbol
280 #define elf_backend_adjust_dynamic_symbol 0
281 #endif
282 #ifndef elf_backend_always_size_sections
283 #define elf_backend_always_size_sections 0
284 #endif
285 #ifndef elf_backend_size_dynamic_sections
286 #define elf_backend_size_dynamic_sections 0
287 #endif
288 #ifndef elf_backend_relocate_section
289 #define elf_backend_relocate_section 0
290 #endif
291 #ifndef elf_backend_finish_dynamic_symbol
292 #define elf_backend_finish_dynamic_symbol 0
293 #endif
294 #ifndef elf_backend_finish_dynamic_sections
295 #define elf_backend_finish_dynamic_sections 0
296 #endif
297 #ifndef elf_backend_begin_write_processing
298 #define elf_backend_begin_write_processing 0
299 #endif
300 #ifndef elf_backend_final_write_processing
301 #define elf_backend_final_write_processing 0
302 #endif
303 #ifndef elf_backend_additional_program_headers
304 #define elf_backend_additional_program_headers 0
305 #endif
306 #ifndef elf_backend_modify_segment_map
307 #define elf_backend_modify_segment_map 0
308 #endif
309 #ifndef elf_backend_ecoff_debug_swap
310 #define elf_backend_ecoff_debug_swap 0
311 #endif
312 #ifndef elf_backend_got_header_size
313 #define elf_backend_got_header_size 0
314 #endif
315 #ifndef elf_backend_plt_header_size
316 #define elf_backend_plt_header_size 0
317 #endif
318 #ifndef elf_backend_post_process_headers
319 #define elf_backend_post_process_headers NULL
320 #endif
321 #ifndef elf_backend_print_symbol_all
322 #define elf_backend_print_symbol_all NULL
323 #endif
324 #ifndef elf_backend_output_arch_syms
325 #define elf_backend_output_arch_syms NULL
326 #endif
327 #ifndef elf_backend_copy_indirect_symbol
328 #define elf_backend_copy_indirect_symbol _bfd_elf_link_hash_copy_indirect
329 #endif
330 #ifndef elf_backend_hide_symbol
331 #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
332 #endif
333 #ifndef elf_backend_emit_relocs
334 #define elf_backend_emit_relocs NULL
335 #endif
336 #ifndef elf_backend_count_relocs
337 #define elf_backend_count_relocs NULL
338 #endif
339 #ifndef elf_backend_grok_prstatus
340 #define elf_backend_grok_prstatus NULL
341 #endif
342 #ifndef elf_backend_grok_psinfo
343 #define elf_backend_grok_psinfo NULL
344 #endif
345 #ifndef elf_backend_sprintf_vma
346 #define elf_backend_sprintf_vma _bfd_elf_sprintf_vma
347 #endif
348 #ifndef elf_backend_fprintf_vma
349 #define elf_backend_fprintf_vma _bfd_elf_fprintf_vma
350 #endif
351 #ifndef elf_backend_reloc_type_class
352 #define elf_backend_reloc_type_class _bfd_elf_reloc_type_class
353 #endif
354
355 /* Previously, backends could only use SHT_REL or SHT_RELA relocation
356 sections, but not both. They defined USE_REL to indicate SHT_REL
357 sections, and left it undefined to indicated SHT_RELA sections.
358 For backwards compatibility, we still support this usage. */
359 #ifndef USE_REL
360 #define USE_REL 0
361 #else
362 #undef USE_REL
363 #define USE_REL 1
364 #endif
365
366 /* Use these in new code. */
367 #ifndef elf_backend_may_use_rel_p
368 #define elf_backend_may_use_rel_p USE_REL
369 #endif
370 #ifndef elf_backend_may_use_rela_p
371 #define elf_backend_may_use_rela_p !USE_REL
372 #endif
373 #ifndef elf_backend_default_use_rela_p
374 #define elf_backend_default_use_rela_p !USE_REL
375 #endif
376
377 #ifndef ELF_MACHINE_ALT1
378 #define ELF_MACHINE_ALT1 0
379 #endif
380
381 #ifndef ELF_MACHINE_ALT2
382 #define ELF_MACHINE_ALT2 0
383 #endif
384
385 #ifndef elf_backend_size_info
386 #define elf_backend_size_info _bfd_elfNN_size_info
387 #endif
388
389 #ifndef elf_backend_sign_extend_vma
390 #define elf_backend_sign_extend_vma 0
391 #endif
392
393 extern const struct elf_size_info _bfd_elfNN_size_info;
394
395 #ifndef INCLUDED_TARGET_FILE
396 static CONST struct elf_backend_data elfNN_bed =
397 {
398 ELF_ARCH, /* arch */
399 ELF_MACHINE_CODE, /* elf_machine_code */
400 ELF_MAXPAGESIZE, /* maxpagesize */
401 elf_info_to_howto,
402 elf_info_to_howto_rel,
403 elf_backend_sym_is_global,
404 elf_backend_object_p,
405 elf_backend_symbol_processing,
406 elf_backend_symbol_table_processing,
407 elf_backend_get_symbol_type,
408 elf_backend_section_processing,
409 elf_backend_section_from_shdr,
410 elf_backend_section_flags,
411 elf_backend_section_from_phdr,
412 elf_backend_fake_sections,
413 elf_backend_section_from_bfd_section,
414 elf_backend_add_symbol_hook,
415 elf_backend_link_output_symbol_hook,
416 elf_backend_create_dynamic_sections,
417 elf_backend_check_relocs,
418 elf_backend_adjust_dynamic_symbol,
419 elf_backend_always_size_sections,
420 elf_backend_size_dynamic_sections,
421 elf_backend_relocate_section,
422 elf_backend_finish_dynamic_symbol,
423 elf_backend_finish_dynamic_sections,
424 elf_backend_begin_write_processing,
425 elf_backend_final_write_processing,
426 elf_backend_additional_program_headers,
427 elf_backend_modify_segment_map,
428 elf_backend_gc_mark_hook,
429 elf_backend_gc_sweep_hook,
430 elf_backend_post_process_headers,
431 elf_backend_print_symbol_all,
432 elf_backend_output_arch_syms,
433 elf_backend_copy_indirect_symbol,
434 elf_backend_hide_symbol,
435 elf_backend_emit_relocs,
436 elf_backend_count_relocs,
437 elf_backend_grok_prstatus,
438 elf_backend_grok_psinfo,
439 elf_backend_sprintf_vma,
440 elf_backend_fprintf_vma,
441 elf_backend_reloc_type_class,
442 elf_backend_ecoff_debug_swap,
443 ELF_MACHINE_ALT1,
444 ELF_MACHINE_ALT2,
445 &elf_backend_size_info,
446 elf_backend_got_symbol_offset,
447 elf_backend_got_header_size,
448 elf_backend_plt_header_size,
449 elf_backend_collect,
450 elf_backend_type_change_ok,
451 elf_backend_may_use_rel_p,
452 elf_backend_may_use_rela_p,
453 elf_backend_default_use_rela_p,
454 elf_backend_sign_extend_vma,
455 elf_backend_want_got_plt,
456 elf_backend_plt_readonly,
457 elf_backend_want_plt_sym,
458 elf_backend_plt_not_loaded,
459 elf_backend_plt_alignment,
460 elf_backend_can_gc_sections,
461 elf_backend_want_dynbss,
462 elf_backend_want_got_sym
463 };
464 #endif
465
466 /* Forward declaration for use when initialising alternative_target field. */
467 #ifdef TARGET_LITTLE_SYM
468 extern const bfd_target TARGET_LITTLE_SYM;
469 #endif
470
471 #ifdef TARGET_BIG_SYM
472 const bfd_target TARGET_BIG_SYM =
473 {
474 /* name: identify kind of target */
475 TARGET_BIG_NAME,
476
477 /* flavour: general indication about file */
478 bfd_target_elf_flavour,
479
480 /* byteorder: data is big endian */
481 BFD_ENDIAN_BIG,
482
483 /* header_byteorder: header is also big endian */
484 BFD_ENDIAN_BIG,
485
486 /* object_flags: mask of all file flags */
487 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
488 DYNAMIC | WP_TEXT | D_PAGED),
489
490 /* section_flags: mask of all section flags */
491 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
492 SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES),
493
494 /* leading_symbol_char: is the first char of a user symbol
495 predictable, and if so what is it */
496 elf_symbol_leading_char,
497
498 /* ar_pad_char: pad character for filenames within an archive header
499 FIXME: this really has nothing to do with ELF, this is a characteristic
500 of the archiver and/or os and should be independently tunable */
501 '/',
502
503 /* ar_max_namelen: maximum number of characters in an archive header
504 FIXME: this really has nothing to do with ELF, this is a characteristic
505 of the archiver and should be independently tunable. This value is
506 a WAG (wild a** guess) */
507 14,
508
509 /* Routines to byte-swap various sized integers from the data sections */
510 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
511 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
512 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
513
514 /* Routines to byte-swap various sized integers from the file headers */
515 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
516 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
517 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
518
519 /* bfd_check_format: check the format of a file being read */
520 { _bfd_dummy_target, /* unknown format */
521 bfd_elfNN_object_p, /* assembler/linker output (object file) */
522 bfd_elfNN_archive_p, /* an archive */
523 bfd_elfNN_core_file_p /* a core file */
524 },
525
526 /* bfd_set_format: set the format of a file being written */
527 { bfd_false,
528 bfd_elfNN_mkobject,
529 bfd_elfNN_mkarchive,
530 bfd_elfNN_mkcorefile
531 },
532
533 /* bfd_write_contents: write cached information into a file being written */
534 { bfd_false,
535 bfd_elfNN_write_object_contents,
536 bfd_elfNN_write_archive_contents,
537 bfd_elfNN_write_corefile_contents,
538 },
539
540 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
541 BFD_JUMP_TABLE_COPY (bfd_elfNN),
542 BFD_JUMP_TABLE_CORE (bfd_elfNN),
543 #ifdef bfd_elfNN_archive_functions
544 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
545 #else
546 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
547 #endif
548 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
549 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
550 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
551 BFD_JUMP_TABLE_LINK (bfd_elfNN),
552 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
553
554 /* Alternative endian target. */
555 #ifdef TARGET_LITTLE_SYM
556 & TARGET_LITTLE_SYM,
557 #else
558 NULL,
559 #endif
560
561 /* backend_data: */
562 (PTR) &elfNN_bed
563 };
564 #endif
565
566 #ifdef TARGET_LITTLE_SYM
567 const bfd_target TARGET_LITTLE_SYM =
568 {
569 /* name: identify kind of target */
570 TARGET_LITTLE_NAME,
571
572 /* flavour: general indication about file */
573 bfd_target_elf_flavour,
574
575 /* byteorder: data is little endian */
576 BFD_ENDIAN_LITTLE,
577
578 /* header_byteorder: header is also little endian */
579 BFD_ENDIAN_LITTLE,
580
581 /* object_flags: mask of all file flags */
582 (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
583 DYNAMIC | WP_TEXT | D_PAGED),
584
585 /* section_flags: mask of all section flags */
586 (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
587 SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES),
588
589 /* leading_symbol_char: is the first char of a user symbol
590 predictable, and if so what is it */
591 elf_symbol_leading_char,
592
593 /* ar_pad_char: pad character for filenames within an archive header
594 FIXME: this really has nothing to do with ELF, this is a characteristic
595 of the archiver and/or os and should be independently tunable */
596 '/',
597
598 /* ar_max_namelen: maximum number of characters in an archive header
599 FIXME: this really has nothing to do with ELF, this is a characteristic
600 of the archiver and should be independently tunable. This value is
601 a WAG (wild a** guess) */
602 14,
603
604 /* Routines to byte-swap various sized integers from the data sections */
605 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
606 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
607 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
608
609 /* Routines to byte-swap various sized integers from the file headers */
610 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
611 bfd_getl32, bfd_getl_signed_32, bfd_putl32,
612 bfd_getl16, bfd_getl_signed_16, bfd_putl16,
613
614 /* bfd_check_format: check the format of a file being read */
615 { _bfd_dummy_target, /* unknown format */
616 bfd_elfNN_object_p, /* assembler/linker output (object file) */
617 bfd_elfNN_archive_p, /* an archive */
618 bfd_elfNN_core_file_p /* a core file */
619 },
620
621 /* bfd_set_format: set the format of a file being written */
622 { bfd_false,
623 bfd_elfNN_mkobject,
624 bfd_elfNN_mkarchive,
625 bfd_elfNN_mkcorefile
626 },
627
628 /* bfd_write_contents: write cached information into a file being written */
629 { bfd_false,
630 bfd_elfNN_write_object_contents,
631 bfd_elfNN_write_archive_contents,
632 bfd_elfNN_write_corefile_contents,
633 },
634
635 BFD_JUMP_TABLE_GENERIC (bfd_elfNN),
636 BFD_JUMP_TABLE_COPY (bfd_elfNN),
637 BFD_JUMP_TABLE_CORE (bfd_elfNN),
638 #ifdef bfd_elfNN_archive_functions
639 BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
640 #else
641 BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
642 #endif
643 BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
644 BFD_JUMP_TABLE_RELOCS (bfd_elfNN),
645 BFD_JUMP_TABLE_WRITE (bfd_elfNN),
646 BFD_JUMP_TABLE_LINK (bfd_elfNN),
647 BFD_JUMP_TABLE_DYNAMIC (bfd_elfNN),
648
649 /* Alternative endian target. */
650 #ifdef TARGET_BIG_SYM
651 & TARGET_BIG_SYM,
652 #else
653 NULL,
654 #endif
655
656 /* backend_data: */
657 (PTR) &elfNN_bed
658 };
659 #endif
This page took 0.044059 seconds and 5 git commands to generate.