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