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