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