1 /* BFD COFF object file private structure.
2 Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
3 Written by Cygnus Support.
5 ** NOTE: libcoff.h is a GENERATED file. Don't change it; instead,
6 ** change libcoff-in.h or coffcode.h.
8 This file is part of BFD, the Binary File Descriptor library.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26 /* Object file tdata; access macros */
28 #define coff_data(bfd) ((bfd)->tdata.coff_obj_data)
29 #define exec_hdr(bfd) (coff_data(bfd)->hdr)
30 #define obj_pe(bfd) (coff_data(bfd)->pe)
31 #define obj_symbols(bfd) (coff_data(bfd)->symbols)
32 #define obj_sym_filepos(bfd) (coff_data(bfd)->sym_filepos)
34 #define obj_relocbase(bfd) (coff_data(bfd)->relocbase)
35 #define obj_raw_syments(bfd) (coff_data(bfd)->raw_syments)
36 #define obj_raw_syment_count(bfd) (coff_data(bfd)->raw_syment_count)
37 #define obj_convert(bfd) (coff_data(bfd)->conversion_table)
38 #define obj_conv_table_size(bfd) (coff_data(bfd)->conv_table_size)
40 #define obj_coff_external_syms(bfd) (coff_data (bfd)->external_syms)
41 #define obj_coff_keep_syms(bfd) (coff_data (bfd)->keep_syms)
42 #define obj_coff_strings(bfd) (coff_data (bfd)->strings)
43 #define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings)
44 #define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes)
46 #define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map)
48 /* `Tdata' information kept for COFF files. */
50 typedef struct coff_tdata
52 struct coff_symbol_struct
*symbols
; /* symtab for input bfd */
53 unsigned int *conversion_table
;
57 struct coff_ptr_struct
*raw_syments
;
58 unsigned int raw_syment_count
;
60 /* These are only valid once writing has begun */
63 /* These members communicate important constants about the symbol table
64 to GDB's symbol-reading code. These `constants' unfortunately vary
65 from coff implementation to implementation... */
66 unsigned local_n_btmask
;
67 unsigned local_n_btshft
;
68 unsigned local_n_tmask
;
69 unsigned local_n_tshift
;
70 unsigned local_symesz
;
71 unsigned local_auxesz
;
72 unsigned local_linesz
;
74 /* The unswapped external symbols. May be NULL. Read by
75 _bfd_coff_get_external_symbols. */
77 /* If this is true, the external_syms may not be freed. */
80 /* The string table. May be NULL. Read by
81 _bfd_coff_read_string_table. */
83 /* If this is true, the strings may not be freed. */
86 /* is this a PE format coff file */
88 /* Used by the COFF backend linker. */
89 struct coff_link_hash_entry
**sym_hashes
;
91 /* used by the pe linker for PowerPC */
92 int *local_toc_sym_map
;
94 struct bfd_link_info
*link_info
;
96 /* Used by coff_find_nearest_line. */
100 /* Tdata for pe image files. */
101 typedef struct pe_tdata
104 struct internal_extra_pe_aouthdr pe_opthdr
;
106 int has_reloc_section
;
107 boolean (*in_reloc_p
) PARAMS((bfd
*, reloc_howto_type
*));
111 #define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
113 /* Tdata for XCOFF files. */
117 /* Basic COFF information. */
120 /* True if a large a.out header should be generated. */
121 boolean full_aouthdr
;
126 /* Index of section holding TOC. */
129 /* Index of section holding entry point. */
132 /* .text alignment from optional header. */
133 int text_align_power
;
135 /* .data alignment from optional header. */
136 int data_align_power
;
138 /* modtype from optional header. */
141 /* cputype from optional header. */
144 /* maxdata from optional header. */
145 bfd_size_type maxdata
;
147 /* maxstack from optional header. */
148 bfd_size_type maxstack
;
150 /* Used by the XCOFF backend linker. */
152 unsigned long *debug_indices
;
153 unsigned int import_file_id
;
156 #define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
158 /* We take the address of the first element of a asymbol to ensure that the
159 * macro is only ever applied to an asymbol. */
160 #define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
162 /* The used_by_bfd field of a section may be set to a pointer to this
165 struct coff_section_tdata
167 /* The relocs, swapped into COFF internal form. This may be NULL. */
168 struct internal_reloc
*relocs
;
169 /* If this is true, the relocs entry may not be freed. */
171 /* The section contents. This may be NULL. */
173 /* If this is true, the contents entry may not be freed. */
174 boolean keep_contents
;
175 /* Information cached by coff_find_nearest_line. */
178 const char *function
;
180 /* Available for individual backends. */
184 /* An accessor macro for the coff_section_tdata structure. */
185 #define coff_section_data(abfd, sec) \
186 ((struct coff_section_tdata *) (sec)->used_by_bfd)
188 /* Tdata for sections in XCOFF files. This is used by the linker. */
190 struct xcoff_section_tdata
192 /* Used for XCOFF csects created by the linker; points to the real
193 XCOFF section which contains this csect. */
195 /* The lineno_count field for the enclosing section, because we are
196 going to clobber it there. */
197 unsigned int lineno_count
;
198 /* The first and one past the last symbol indices for symbols used
200 unsigned long first_symndx
;
201 unsigned long last_symndx
;
204 /* An accessor macro the xcoff_section_tdata structure. */
205 #define xcoff_section_data(abfd, sec) \
206 ((struct xcoff_section_tdata *) coff_section_data ((abfd), (sec))->tdata)
208 /* COFF linker hash table entries. */
210 struct coff_link_hash_entry
212 struct bfd_link_hash_entry root
;
214 /* Symbol index in output file. Set to -1 initially. Set to -2 if
215 there is a reloc against this symbol. */
224 /* Number of auxiliary entries. */
227 /* BFD to take auxiliary entries from. */
230 /* Pointer to array of auxiliary entries, if any. */
231 union internal_auxent
*aux
;
234 /* COFF linker hash table. */
236 struct coff_link_hash_table
238 struct bfd_link_hash_table root
;
241 /* Look up an entry in a COFF linker hash table. */
243 #define coff_link_hash_lookup(table, string, create, copy, follow) \
244 ((struct coff_link_hash_entry *) \
245 bfd_link_hash_lookup (&(table)->root, (string), (create), \
248 /* Traverse a COFF linker hash table. */
250 #define coff_link_hash_traverse(table, func, info) \
251 (bfd_link_hash_traverse \
253 (boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \
256 /* Get the COFF linker hash table from a link_info structure. */
258 #define coff_hash_table(p) ((struct coff_link_hash_table *) ((p)->hash))
260 /* Functions in coffgen.c. */
261 extern const bfd_target
*coff_object_p
PARAMS ((bfd
*));
262 extern struct sec
*coff_section_from_bfd_index
PARAMS ((bfd
*, int));
263 extern long coff_get_symtab_upper_bound
PARAMS ((bfd
*));
264 extern long coff_get_symtab
PARAMS ((bfd
*, asymbol
**));
265 extern int coff_count_linenumbers
PARAMS ((bfd
*));
266 extern struct coff_symbol_struct
*coff_symbol_from
PARAMS ((bfd
*, asymbol
*));
267 extern boolean coff_renumber_symbols
PARAMS ((bfd
*, int *));
268 extern void coff_mangle_symbols
PARAMS ((bfd
*));
269 extern boolean coff_write_symbols
PARAMS ((bfd
*));
270 extern boolean coff_write_linenumbers
PARAMS ((bfd
*));
271 extern alent
*coff_get_lineno
PARAMS ((bfd
*, asymbol
*));
272 extern asymbol
*coff_section_symbol
PARAMS ((bfd
*, char *));
273 extern boolean _bfd_coff_get_external_symbols
PARAMS ((bfd
*));
274 extern const char *_bfd_coff_read_string_table
PARAMS ((bfd
*));
275 extern boolean _bfd_coff_free_symbols
PARAMS ((bfd
*));
276 extern struct coff_ptr_struct
*coff_get_normalized_symtab
PARAMS ((bfd
*));
277 extern long coff_get_reloc_upper_bound
PARAMS ((bfd
*, sec_ptr
));
278 extern asymbol
*coff_make_empty_symbol
PARAMS ((bfd
*));
279 extern void coff_print_symbol
PARAMS ((bfd
*, PTR filep
, asymbol
*,
280 bfd_print_symbol_type how
));
281 extern void coff_get_symbol_info
PARAMS ((bfd
*, asymbol
*,
283 extern asymbol
*coff_bfd_make_debug_symbol
PARAMS ((bfd
*, PTR
,
285 extern boolean coff_find_nearest_line
PARAMS ((bfd
*,
289 CONST
char **filename_ptr
,
290 CONST
char **functionname_ptr
,
291 unsigned int *line_ptr
));
292 extern int coff_sizeof_headers
PARAMS ((bfd
*, boolean reloc
));
293 extern boolean bfd_coff_reloc16_relax_section
294 PARAMS ((bfd
*, asection
*, struct bfd_link_info
*, boolean
*));
295 extern bfd_byte
*bfd_coff_reloc16_get_relocated_section_contents
296 PARAMS ((bfd
*, struct bfd_link_info
*, struct bfd_link_order
*,
297 bfd_byte
*, boolean relocateable
, asymbol
**));
298 extern bfd_vma bfd_coff_reloc16_get_value
PARAMS ((arelent
*,
299 struct bfd_link_info
*,
301 extern void bfd_perform_slip
PARAMS ((bfd
*abfd
, unsigned int slip
,
302 asection
*input_section
,
305 /* Functions and types in cofflink.c. */
307 #define STRING_SIZE_SIZE (4)
309 /* We use a hash table to merge identical enum, struct, and union
310 definitions in the linker. */
312 /* Information we keep for a single element (an enum value, a
313 structure or union field) in the debug merge hash table. */
315 struct coff_debug_merge_element
318 struct coff_debug_merge_element
*next
;
326 /* Symbol index for complex type. */
330 /* A linked list of debug merge entries for a given name. */
332 struct coff_debug_merge_type
334 /* Next type with the same name. */
335 struct coff_debug_merge_type
*next
;
340 /* Symbol index where this type is defined. */
343 /* List of elements. */
344 struct coff_debug_merge_element
*elements
;
347 /* Information we store in the debug merge hash table. */
349 struct coff_debug_merge_hash_entry
351 struct bfd_hash_entry root
;
353 /* A list of types with this name. */
354 struct coff_debug_merge_type
*types
;
357 /* The debug merge hash table. */
359 struct coff_debug_merge_hash_table
361 struct bfd_hash_table root
;
364 /* Initialize a COFF debug merge hash table. */
366 #define coff_debug_merge_hash_table_init(table) \
367 (bfd_hash_table_init (&(table)->root, _bfd_coff_debug_merge_hash_newfunc))
369 /* Free a COFF debug merge hash table. */
371 #define coff_debug_merge_hash_table_free(table) \
372 (bfd_hash_table_free (&(table)->root))
374 /* Look up an entry in a COFF debug merge hash table. */
376 #define coff_debug_merge_hash_lookup(table, string, create, copy) \
377 ((struct coff_debug_merge_hash_entry *) \
378 bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
380 /* Information we keep for each section in the output file when doing
381 a relocateable link. */
383 struct coff_link_section_info
385 /* The relocs to be output. */
386 struct internal_reloc
*relocs
;
387 /* For each reloc against a global symbol whose index was not known
388 when the reloc was handled, the global hash table entry. */
389 struct coff_link_hash_entry
**rel_hashes
;
392 /* Information that we pass around while doing the final link step. */
394 struct coff_final_link_info
396 /* General link information. */
397 struct bfd_link_info
*info
;
400 /* Used to indicate failure in traversal routine. */
402 /* Hash table for long symbol names. */
403 struct bfd_strtab_hash
*strtab
;
404 /* When doing a relocateable link, an array of information kept for
405 each output section, indexed by the target_index field. */
406 struct coff_link_section_info
*section_info
;
407 /* Symbol index of last C_FILE symbol (-1 if none). */
408 long last_file_index
;
409 /* Contents of last C_FILE symbol. */
410 struct internal_syment last_file
;
411 /* Symbol index of first aux entry of last .bf symbol with an empty
412 endndx field (-1 if none). */
414 /* Contents of last_bf_index aux entry. */
415 union internal_auxent last_bf
;
416 /* Hash table used to merge debug information. */
417 struct coff_debug_merge_hash_table debug_merge
;
418 /* Buffer large enough to hold swapped symbols of any input file. */
419 struct internal_syment
*internal_syms
;
420 /* Buffer large enough to hold sections of symbols of any input file. */
422 /* Buffer large enough to hold output indices of symbols of any
425 /* Buffer large enough to hold output symbols for any input file. */
427 /* Buffer large enough to hold external line numbers for any input
430 /* Buffer large enough to hold any input section. */
432 /* Buffer large enough to hold external relocs of any input section. */
433 bfd_byte
*external_relocs
;
434 /* Buffer large enough to hold swapped relocs of any input section. */
435 struct internal_reloc
*internal_relocs
;
438 extern struct bfd_hash_entry
*_bfd_coff_link_hash_newfunc
439 PARAMS ((struct bfd_hash_entry
*, struct bfd_hash_table
*, const char *));
440 extern boolean _bfd_coff_link_hash_table_init
441 PARAMS ((struct coff_link_hash_table
*, bfd
*,
442 struct bfd_hash_entry
*(*) (struct bfd_hash_entry
*,
443 struct bfd_hash_table
*,
445 extern struct bfd_link_hash_table
*_bfd_coff_link_hash_table_create
447 extern const char *_bfd_coff_internal_syment_name
448 PARAMS ((bfd
*, const struct internal_syment
*, char *));
449 extern boolean _bfd_coff_link_add_symbols
450 PARAMS ((bfd
*, struct bfd_link_info
*));
451 extern boolean _bfd_coff_final_link
452 PARAMS ((bfd
*, struct bfd_link_info
*));
453 extern struct internal_reloc
*_bfd_coff_read_internal_relocs
454 PARAMS ((bfd
*, asection
*, boolean
, bfd_byte
*, boolean
,
455 struct internal_reloc
*));
456 extern boolean _bfd_coff_generic_relocate_section
457 PARAMS ((bfd
*, struct bfd_link_info
*, bfd
*, asection
*, bfd_byte
*,
458 struct internal_reloc
*, struct internal_syment
*, asection
**));
460 extern struct bfd_hash_entry
*_bfd_coff_debug_merge_hash_newfunc
461 PARAMS ((struct bfd_hash_entry
*, struct bfd_hash_table
*, const char *));
462 extern boolean _bfd_coff_write_global_sym
463 PARAMS ((struct coff_link_hash_entry
*, PTR
));
464 extern boolean _bfd_coff_link_input_bfd
465 PARAMS ((struct coff_final_link_info
*, bfd
*));
466 extern boolean _bfd_coff_reloc_link_order
467 PARAMS ((bfd
*, struct coff_final_link_info
*, asection
*,
468 struct bfd_link_order
*));
471 #define coff_get_section_contents_in_window \
472 _bfd_generic_get_section_contents_in_window
474 /* Functions in xcofflink.c. */
476 extern struct bfd_link_hash_table
*_bfd_xcoff_bfd_link_hash_table_create
478 extern boolean _bfd_xcoff_bfd_link_add_symbols
479 PARAMS ((bfd
*, struct bfd_link_info
*));
480 extern boolean _bfd_xcoff_bfd_final_link
481 PARAMS ((bfd
*, struct bfd_link_info
*));
482 extern boolean _bfd_ppc_xcoff_relocate_section
483 PARAMS ((bfd
*, struct bfd_link_info
*, bfd
*, asection
*, bfd_byte
*,
484 struct internal_reloc
*, struct internal_syment
*, asection
**));
486 /* And more taken from the source .. */
488 typedef struct coff_ptr_struct
491 /* Remembers the offset from the first symbol in the file for
492 this symbol. Generated by coff_renumber_symbols. */
495 /* Should the value of this symbol be renumbered. Used for
496 XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
497 unsigned int fix_value
: 1;
499 /* Should the tag field of this symbol be renumbered.
500 Created by coff_pointerize_aux. */
501 unsigned int fix_tag
: 1;
503 /* Should the endidx field of this symbol be renumbered.
504 Created by coff_pointerize_aux. */
505 unsigned int fix_end
: 1;
507 /* Should the x_csect.x_scnlen field be renumbered.
508 Created by coff_pointerize_aux. */
509 unsigned int fix_scnlen
: 1;
511 /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
512 index into the line number entries. Set by
513 coff_slurp_symbol_table. */
514 unsigned int fix_line
: 1;
516 /* The container for the symbol structure as read and translated
520 union internal_auxent auxent
;
521 struct internal_syment syment
;
523 } combined_entry_type
;
526 /* Each canonical asymbol really looks like this: */
528 typedef struct coff_symbol_struct
530 /* The actual symbol which the rest of BFD works with */
533 /* A pointer to the hidden information for this symbol */
534 combined_entry_type
*native
;
536 /* A pointer to the linenumber information for this symbol */
537 struct lineno_cache_entry
*lineno
;
539 /* Have the line numbers been relocated yet ? */
544 void (*_bfd_coff_swap_aux_in
) PARAMS ((
553 void (*_bfd_coff_swap_sym_in
) PARAMS ((
558 void (*_bfd_coff_swap_lineno_in
) PARAMS ((
563 unsigned int (*_bfd_coff_swap_aux_out
) PARAMS ((
572 unsigned int (*_bfd_coff_swap_sym_out
) PARAMS ((
577 unsigned int (*_bfd_coff_swap_lineno_out
) PARAMS ((
582 unsigned int (*_bfd_coff_swap_reloc_out
) PARAMS ((
587 unsigned int (*_bfd_coff_swap_filehdr_out
) PARAMS ((
592 unsigned int (*_bfd_coff_swap_aouthdr_out
) PARAMS ((
597 unsigned int (*_bfd_coff_swap_scnhdr_out
) PARAMS ((
602 unsigned int _bfd_filhsz
;
603 unsigned int _bfd_aoutsz
;
604 unsigned int _bfd_scnhsz
;
605 unsigned int _bfd_symesz
;
606 unsigned int _bfd_auxesz
;
607 unsigned int _bfd_relsz
;
608 unsigned int _bfd_linesz
;
609 boolean _bfd_coff_long_filenames
;
610 void (*_bfd_coff_swap_filehdr_in
) PARAMS ((
614 void (*_bfd_coff_swap_aouthdr_in
) PARAMS ((
618 void (*_bfd_coff_swap_scnhdr_in
) PARAMS ((
622 void (*_bfd_coff_swap_reloc_in
) PARAMS ((
626 boolean (*_bfd_coff_bad_format_hook
) PARAMS ((
628 PTR internal_filehdr
));
629 boolean (*_bfd_coff_set_arch_mach_hook
) PARAMS ((
631 PTR internal_filehdr
));
632 PTR (*_bfd_coff_mkobject_hook
) PARAMS ((
634 PTR internal_filehdr
,
635 PTR internal_aouthdr
));
636 flagword (*_bfd_styp_to_sec_flags_hook
) PARAMS ((
640 void (*_bfd_set_alignment_hook
) PARAMS ((
643 PTR internal_scnhdr
));
644 boolean (*_bfd_coff_slurp_symbol_table
) PARAMS ((
646 boolean (*_bfd_coff_symname_in_debug
) PARAMS ((
648 struct internal_syment
*sym
));
649 boolean (*_bfd_coff_pointerize_aux_hook
) PARAMS ((
651 combined_entry_type
*table_base
,
652 combined_entry_type
*symbol
,
654 combined_entry_type
*aux
));
655 boolean (*_bfd_coff_print_aux
) PARAMS ((
658 combined_entry_type
*table_base
,
659 combined_entry_type
*symbol
,
660 combined_entry_type
*aux
,
661 unsigned int indaux
));
662 void (*_bfd_coff_reloc16_extra_cases
) PARAMS ((
664 struct bfd_link_info
*link_info
,
665 struct bfd_link_order
*link_order
,
668 unsigned int *src_ptr
,
669 unsigned int *dst_ptr
));
670 int (*_bfd_coff_reloc16_estimate
) PARAMS ((
672 asection
*input_section
,
675 struct bfd_link_info
*link_info
));
676 boolean (*_bfd_coff_sym_is_global
) PARAMS ((
678 struct internal_syment
*));
679 void (*_bfd_coff_compute_section_file_positions
) PARAMS ((
681 boolean (*_bfd_coff_start_final_link
) PARAMS ((
683 struct bfd_link_info
*info
));
684 boolean (*_bfd_coff_relocate_section
) PARAMS ((
686 struct bfd_link_info
*info
,
688 asection
*input_section
,
690 struct internal_reloc
*relocs
,
691 struct internal_syment
*syms
,
692 asection
**sections
));
693 reloc_howto_type
*(*_bfd_coff_rtype_to_howto
) PARAMS ((
696 struct internal_reloc
*rel
,
697 struct coff_link_hash_entry
*h
,
698 struct internal_syment
*sym
,
700 boolean (*_bfd_coff_adjust_symndx
) PARAMS ((
702 struct bfd_link_info
*info
,
705 struct internal_reloc
*reloc
,
706 boolean
*adjustedp
));
707 boolean (*_bfd_coff_link_add_one_symbol
) PARAMS ((
708 struct bfd_link_info
*info
,
717 struct bfd_link_hash_entry
**hashp
));
719 } bfd_coff_backend_data
;
721 #define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
723 #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
724 ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
726 #define bfd_coff_swap_sym_in(a,e,i) \
727 ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
729 #define bfd_coff_swap_lineno_in(a,e,i) \
730 ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
732 #define bfd_coff_swap_reloc_out(abfd, i, o) \
733 ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
735 #define bfd_coff_swap_lineno_out(abfd, i, o) \
736 ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
738 #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
739 ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
741 #define bfd_coff_swap_sym_out(abfd, i,o) \
742 ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
744 #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
745 ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
747 #define bfd_coff_swap_filehdr_out(abfd, i,o) \
748 ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
750 #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
751 ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
753 #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
754 #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
755 #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
756 #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
757 #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
758 #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
759 #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
760 #define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames)
761 #define bfd_coff_swap_filehdr_in(abfd, i,o) \
762 ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
764 #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
765 ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
767 #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
768 ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
770 #define bfd_coff_swap_reloc_in(abfd, i, o) \
771 ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
773 #define bfd_coff_bad_format_hook(abfd, filehdr) \
774 ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
776 #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
777 ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
778 #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
779 ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
781 #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name)\
782 ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook) (abfd, scnhdr, name))
784 #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
785 ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
787 #define bfd_coff_slurp_symbol_table(abfd)\
788 ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
790 #define bfd_coff_symname_in_debug(abfd, sym)\
791 ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
793 #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
794 ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
795 (abfd, file, base, symbol, aux, indaux))
797 #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\
798 ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
799 (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
801 #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
802 ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
803 (abfd, section, reloc, shrink, link_info))
805 #define bfd_coff_sym_is_global(abfd, sym)\
806 ((coff_backend_info (abfd)->_bfd_coff_sym_is_global)\
809 #define bfd_coff_compute_section_file_positions(abfd)\
810 ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
813 #define bfd_coff_start_final_link(obfd, info)\
814 ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
816 #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
817 ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
818 (obfd, info, ibfd, o, con, rel, isyms, secs))
819 #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
820 ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
821 (abfd, sec, rel, h, sym, addendp))
822 #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
823 ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
824 (obfd, info, ibfd, sec, rel, adjustedp))
825 #define bfd_coff_link_add_one_symbol(info,abfd,name,flags,section,value,string,cp,coll,hashp)\
826 ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
827 (info, abfd, name, flags, section, value, string, cp, coll, hashp))