186d7f5d3SJohn Marino /* BFD ECOFF object file private structure. 286d7f5d3SJohn Marino Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003, 2004, 386d7f5d3SJohn Marino 2005, 2006, 2007, 2008, 2009, 2010 486d7f5d3SJohn Marino Free Software Foundation, Inc. 586d7f5d3SJohn Marino Written by Ian Lance Taylor, Cygnus Support. 686d7f5d3SJohn Marino 786d7f5d3SJohn Marino This file is part of BFD, the Binary File Descriptor library. 886d7f5d3SJohn Marino 986d7f5d3SJohn Marino This program is free software; you can redistribute it and/or modify 1086d7f5d3SJohn Marino it under the terms of the GNU General Public License as published by 1186d7f5d3SJohn Marino the Free Software Foundation; either version 3 of the License, or 1286d7f5d3SJohn Marino (at your option) any later version. 1386d7f5d3SJohn Marino 1486d7f5d3SJohn Marino This program is distributed in the hope that it will be useful, 1586d7f5d3SJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of 1686d7f5d3SJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1786d7f5d3SJohn Marino GNU General Public License for more details. 1886d7f5d3SJohn Marino 1986d7f5d3SJohn Marino You should have received a copy of the GNU General Public License 2086d7f5d3SJohn Marino along with this program; if not, write to the Free Software 2186d7f5d3SJohn Marino Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 2286d7f5d3SJohn Marino MA 02110-1301, USA. */ 2386d7f5d3SJohn Marino 2486d7f5d3SJohn Marino #include "bfdlink.h" 2586d7f5d3SJohn Marino 2686d7f5d3SJohn Marino #ifndef ECOFF_H 2786d7f5d3SJohn Marino #include "coff/ecoff.h" 2886d7f5d3SJohn Marino #endif 2986d7f5d3SJohn Marino 3086d7f5d3SJohn Marino /* This is the backend information kept for ECOFF files. This 3186d7f5d3SJohn Marino structure is constant for a particular backend. The first element 3286d7f5d3SJohn Marino is the COFF backend data structure, so that ECOFF targets can use 3386d7f5d3SJohn Marino the generic COFF code. */ 3486d7f5d3SJohn Marino 3586d7f5d3SJohn Marino #define ecoff_backend(abfd) \ 3686d7f5d3SJohn Marino ((struct ecoff_backend_data *) (abfd)->xvec->backend_data) 3786d7f5d3SJohn Marino 3886d7f5d3SJohn Marino struct ecoff_backend_data 3986d7f5d3SJohn Marino { 4086d7f5d3SJohn Marino /* COFF backend information. This must be the first field. */ 4186d7f5d3SJohn Marino bfd_coff_backend_data coff; 4286d7f5d3SJohn Marino /* Supported architecture. */ 4386d7f5d3SJohn Marino enum bfd_architecture arch; 4486d7f5d3SJohn Marino /* Initial portion of armap string. */ 4586d7f5d3SJohn Marino const char *armap_start; 4686d7f5d3SJohn Marino /* The page boundary used to align sections in a demand-paged 4786d7f5d3SJohn Marino executable file. E.g., 0x1000. */ 4886d7f5d3SJohn Marino bfd_vma round; 4986d7f5d3SJohn Marino /* TRUE if the .rdata section is part of the text segment, as on the 5086d7f5d3SJohn Marino Alpha. FALSE if .rdata is part of the data segment, as on the 5186d7f5d3SJohn Marino MIPS. */ 5286d7f5d3SJohn Marino bfd_boolean rdata_in_text; 5386d7f5d3SJohn Marino /* Bitsize of constructor entries. */ 5486d7f5d3SJohn Marino unsigned int constructor_bitsize; 5586d7f5d3SJohn Marino /* Reloc to use for constructor entries. */ 5686d7f5d3SJohn Marino reloc_howto_type *constructor_reloc; 5786d7f5d3SJohn Marino /* How to swap debugging information. */ 5886d7f5d3SJohn Marino struct ecoff_debug_swap debug_swap; 5986d7f5d3SJohn Marino /* External reloc size. */ 6086d7f5d3SJohn Marino bfd_size_type external_reloc_size; 6186d7f5d3SJohn Marino /* Reloc swapping functions. */ 6286d7f5d3SJohn Marino void (*swap_reloc_in) (bfd *, void *, struct internal_reloc *); 6386d7f5d3SJohn Marino void (*swap_reloc_out) (bfd *, const struct internal_reloc *, void *); 6486d7f5d3SJohn Marino /* Backend reloc tweaking. */ 6586d7f5d3SJohn Marino void (*adjust_reloc_in) 6686d7f5d3SJohn Marino (bfd *, const struct internal_reloc *, arelent *); 6786d7f5d3SJohn Marino void (*adjust_reloc_out) 6886d7f5d3SJohn Marino (bfd *, const arelent *, struct internal_reloc *); 6986d7f5d3SJohn Marino /* Relocate section contents while linking. */ 7086d7f5d3SJohn Marino bfd_boolean (*relocate_section) 7186d7f5d3SJohn Marino (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, void *); 7286d7f5d3SJohn Marino /* Do final adjustments to filehdr and aouthdr. */ 7386d7f5d3SJohn Marino bfd_boolean (*adjust_headers) 7486d7f5d3SJohn Marino (bfd *, struct internal_filehdr *, struct internal_aouthdr *); 7586d7f5d3SJohn Marino /* Read an element from an archive at a given file position. This 7686d7f5d3SJohn Marino is needed because OSF/1 3.2 uses a weird archive format. */ 7786d7f5d3SJohn Marino bfd *(*get_elt_at_filepos) (bfd *, file_ptr); 7886d7f5d3SJohn Marino }; 7986d7f5d3SJohn Marino 8086d7f5d3SJohn Marino /* ECOFF targets don't support COFF long section names, so this 8186d7f5d3SJohn Marino macro is provided to use as an initialiser for the related 8286d7f5d3SJohn Marino members of the embedded bfd_coff_backend_data struct. */ 8386d7f5d3SJohn Marino #define ECOFF_NO_LONG_SECTION_NAMES (FALSE), _bfd_ecoff_no_long_sections 8486d7f5d3SJohn Marino 8586d7f5d3SJohn Marino /* This is the target specific information kept for ECOFF files. */ 8686d7f5d3SJohn Marino 8786d7f5d3SJohn Marino #define ecoff_data(abfd) ((abfd)->tdata.ecoff_obj_data) 8886d7f5d3SJohn Marino 8986d7f5d3SJohn Marino typedef struct ecoff_tdata 9086d7f5d3SJohn Marino { 9186d7f5d3SJohn Marino /* The reloc file position, set by 9286d7f5d3SJohn Marino ecoff_compute_section_file_positions. */ 9386d7f5d3SJohn Marino file_ptr reloc_filepos; 9486d7f5d3SJohn Marino 9586d7f5d3SJohn Marino /* The symbol table file position, set by _bfd_ecoff_mkobject_hook. */ 9686d7f5d3SJohn Marino file_ptr sym_filepos; 9786d7f5d3SJohn Marino 9886d7f5d3SJohn Marino /* The start and end of the text segment. Only valid for an 9986d7f5d3SJohn Marino existing file, not for one we are creating. */ 10086d7f5d3SJohn Marino unsigned long text_start; 10186d7f5d3SJohn Marino unsigned long text_end; 10286d7f5d3SJohn Marino 10386d7f5d3SJohn Marino /* The cached gp value. This is used when relocating. */ 10486d7f5d3SJohn Marino bfd_vma gp; 10586d7f5d3SJohn Marino 10686d7f5d3SJohn Marino /* The maximum size of objects to optimize using gp. This is 10786d7f5d3SJohn Marino typically set by the -G option to the compiler, assembler or 10886d7f5d3SJohn Marino linker. */ 10986d7f5d3SJohn Marino unsigned int gp_size; 11086d7f5d3SJohn Marino 11186d7f5d3SJohn Marino /* The register masks. When linking, all the masks found in the 11286d7f5d3SJohn Marino input files are combined into the masks of the output file. 11386d7f5d3SJohn Marino These are not all used for all targets, but that's OK, because 11486d7f5d3SJohn Marino the relevant ones are the only ones swapped in and out. */ 11586d7f5d3SJohn Marino unsigned long gprmask; 11686d7f5d3SJohn Marino unsigned long fprmask; 11786d7f5d3SJohn Marino unsigned long cprmask[4]; 11886d7f5d3SJohn Marino 11986d7f5d3SJohn Marino /* The ECOFF symbolic debugging information. */ 12086d7f5d3SJohn Marino struct ecoff_debug_info debug_info; 12186d7f5d3SJohn Marino 12286d7f5d3SJohn Marino /* The unswapped ECOFF symbolic information. */ 12386d7f5d3SJohn Marino void * raw_syments; 12486d7f5d3SJohn Marino 12586d7f5d3SJohn Marino /* The canonical BFD symbols. */ 12686d7f5d3SJohn Marino struct ecoff_symbol_struct *canonical_symbols; 12786d7f5d3SJohn Marino 12886d7f5d3SJohn Marino /* A mapping from external symbol numbers to entries in the linker 12986d7f5d3SJohn Marino hash table, used when linking. */ 13086d7f5d3SJohn Marino struct ecoff_link_hash_entry **sym_hashes; 13186d7f5d3SJohn Marino 13286d7f5d3SJohn Marino /* A mapping from reloc symbol indices to sections, used when 13386d7f5d3SJohn Marino linking. */ 13486d7f5d3SJohn Marino asection **symndx_to_section; 13586d7f5d3SJohn Marino 13686d7f5d3SJohn Marino /* TRUE if this BFD was written by the backend linker. */ 13786d7f5d3SJohn Marino bfd_boolean linker; 13886d7f5d3SJohn Marino 13986d7f5d3SJohn Marino /* TRUE if a warning that multiple global pointer values are 14086d7f5d3SJohn Marino needed in the output binary was issued already. */ 14186d7f5d3SJohn Marino bfd_boolean issued_multiple_gp_warning; 14286d7f5d3SJohn Marino 14386d7f5d3SJohn Marino /* Used by find_nearest_line entry point. The structure could be 14486d7f5d3SJohn Marino included directly in this one, but there's no point to wasting 14586d7f5d3SJohn Marino the memory just for the infrequently called find_nearest_line. */ 14686d7f5d3SJohn Marino struct ecoff_find_line *find_line_info; 14786d7f5d3SJohn Marino 14886d7f5d3SJohn Marino /* Whether the .rdata section is in the text segment for this 14986d7f5d3SJohn Marino particular ECOFF file. This is not valid until 15086d7f5d3SJohn Marino ecoff_compute_section_file_positions is called. */ 15186d7f5d3SJohn Marino bfd_boolean rdata_in_text; 15286d7f5d3SJohn Marino 15386d7f5d3SJohn Marino } ecoff_data_type; 15486d7f5d3SJohn Marino 15586d7f5d3SJohn Marino /* Each canonical asymbol really looks like this. */ 15686d7f5d3SJohn Marino 15786d7f5d3SJohn Marino typedef struct ecoff_symbol_struct 15886d7f5d3SJohn Marino { 15986d7f5d3SJohn Marino /* The actual symbol which the rest of BFD works with */ 16086d7f5d3SJohn Marino asymbol symbol; 16186d7f5d3SJohn Marino 16286d7f5d3SJohn Marino /* The fdr for this symbol. */ 16386d7f5d3SJohn Marino FDR *fdr; 16486d7f5d3SJohn Marino 16586d7f5d3SJohn Marino /* TRUE if this is a local symbol rather than an external one. */ 16686d7f5d3SJohn Marino bfd_boolean local; 16786d7f5d3SJohn Marino 16886d7f5d3SJohn Marino /* A pointer to the unswapped hidden information for this symbol. 16986d7f5d3SJohn Marino This is either a struct sym_ext or a struct ext_ext, depending on 17086d7f5d3SJohn Marino the value of the local field above. */ 17186d7f5d3SJohn Marino void * native; 17286d7f5d3SJohn Marino } ecoff_symbol_type; 17386d7f5d3SJohn Marino 17486d7f5d3SJohn Marino /* We take the address of the first element of an asymbol to ensure that the 17586d7f5d3SJohn Marino macro is only ever applied to an asymbol. */ 17686d7f5d3SJohn Marino #define ecoffsymbol(asymbol) ((ecoff_symbol_type *) (&((asymbol)->the_bfd))) 17786d7f5d3SJohn Marino 17886d7f5d3SJohn Marino /* We need to save the index of an external symbol when we write it 17986d7f5d3SJohn Marino out so that can set the symbol index correctly when we write out 18086d7f5d3SJohn Marino the relocs. */ 18186d7f5d3SJohn Marino #define ecoff_get_sym_index(symbol) ((symbol)->udata.i) 18286d7f5d3SJohn Marino #define ecoff_set_sym_index(symbol, idx) ((symbol)->udata.i = (idx)) 18386d7f5d3SJohn Marino 18486d7f5d3SJohn Marino /* A pointer to this structure is put in the used_by_bfd pointer of 18586d7f5d3SJohn Marino a section to keep track of any per-section data. 18686d7f5d3SJohn Marino The user_by_bfd pointer will be NULL if the information was not 18786d7f5d3SJohn Marino needed. */ 18886d7f5d3SJohn Marino 18986d7f5d3SJohn Marino struct ecoff_section_tdata 19086d7f5d3SJohn Marino { 19186d7f5d3SJohn Marino /* When producing an executable (i.e., final, non-relocatable link) 19286d7f5d3SJohn Marino on the Alpha, we may need to use multiple global pointer values 19386d7f5d3SJohn Marino to span the entire .lita section. In essence, we allow each 19486d7f5d3SJohn Marino input .lita section to have its own gp value. To support this, 19586d7f5d3SJohn Marino we need to keep track of the gp values that we picked for each 19686d7f5d3SJohn Marino input .lita section . */ 19786d7f5d3SJohn Marino bfd_vma gp; 19886d7f5d3SJohn Marino }; 19986d7f5d3SJohn Marino 20086d7f5d3SJohn Marino /* An accessor macro for the ecoff_section_tdata structure. */ 20186d7f5d3SJohn Marino #define ecoff_section_data(abfd, sec) \ 20286d7f5d3SJohn Marino ((struct ecoff_section_tdata *) (sec)->used_by_bfd) 20386d7f5d3SJohn Marino 20486d7f5d3SJohn Marino /* ECOFF linker hash table entries. */ 20586d7f5d3SJohn Marino 20686d7f5d3SJohn Marino struct ecoff_link_hash_entry 20786d7f5d3SJohn Marino { 20886d7f5d3SJohn Marino struct bfd_link_hash_entry root; 20986d7f5d3SJohn Marino /* Symbol index in output file. */ 21086d7f5d3SJohn Marino long indx; 21186d7f5d3SJohn Marino /* BFD that ext field value came from. */ 21286d7f5d3SJohn Marino bfd *abfd; 21386d7f5d3SJohn Marino /* ECOFF external symbol information. */ 21486d7f5d3SJohn Marino EXTR esym; 21586d7f5d3SJohn Marino /* Nonzero if this symbol has been written out. */ 21686d7f5d3SJohn Marino char written; 21786d7f5d3SJohn Marino /* Nonzero if this symbol was referred to as small undefined. */ 21886d7f5d3SJohn Marino char small; 21986d7f5d3SJohn Marino }; 22086d7f5d3SJohn Marino 22186d7f5d3SJohn Marino /* ECOFF linker hash table. */ 22286d7f5d3SJohn Marino 22386d7f5d3SJohn Marino struct ecoff_link_hash_table 22486d7f5d3SJohn Marino { 22586d7f5d3SJohn Marino struct bfd_link_hash_table root; 22686d7f5d3SJohn Marino }; 22786d7f5d3SJohn Marino 22886d7f5d3SJohn Marino /* Make an ECOFF object. */ 22986d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_mkobject (bfd *); 23086d7f5d3SJohn Marino 23186d7f5d3SJohn Marino /* Read in the ECOFF symbolic debugging information. */ 23286d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_slurp_symbolic_info 23386d7f5d3SJohn Marino (bfd *, asection *, struct ecoff_debug_info *); 23486d7f5d3SJohn Marino 23586d7f5d3SJohn Marino /* Generic ECOFF BFD backend vectors. */ 23686d7f5d3SJohn Marino 23786d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_write_object_contents (bfd *); 23886d7f5d3SJohn Marino 23986d7f5d3SJohn Marino #define _bfd_ecoff_close_and_cleanup _bfd_generic_close_and_cleanup 24086d7f5d3SJohn Marino #define _bfd_ecoff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info 24186d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_new_section_hook 24286d7f5d3SJohn Marino (bfd *, asection *); 24386d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_get_section_contents 24486d7f5d3SJohn Marino (bfd *, asection *, void * location, file_ptr, bfd_size_type); 24586d7f5d3SJohn Marino 24686d7f5d3SJohn Marino #define _bfd_ecoff_bfd_link_split_section _bfd_generic_link_split_section 24786d7f5d3SJohn Marino 24886d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_bfd_copy_private_bfd_data 24986d7f5d3SJohn Marino (bfd *, bfd *); 25086d7f5d3SJohn Marino #define _bfd_ecoff_bfd_copy_private_section_data \ 25186d7f5d3SJohn Marino _bfd_generic_bfd_copy_private_section_data 25286d7f5d3SJohn Marino 25386d7f5d3SJohn Marino #define _bfd_ecoff_bfd_copy_private_symbol_data \ 25486d7f5d3SJohn Marino _bfd_generic_bfd_copy_private_symbol_data 25586d7f5d3SJohn Marino 25686d7f5d3SJohn Marino #define _bfd_ecoff_bfd_copy_private_header_data \ 25786d7f5d3SJohn Marino _bfd_generic_bfd_copy_private_header_data 25886d7f5d3SJohn Marino 25986d7f5d3SJohn Marino #define _bfd_ecoff_bfd_print_private_bfd_data \ 26086d7f5d3SJohn Marino _bfd_generic_bfd_print_private_bfd_data 26186d7f5d3SJohn Marino 26286d7f5d3SJohn Marino #define _bfd_ecoff_bfd_merge_private_bfd_data \ 26386d7f5d3SJohn Marino _bfd_generic_bfd_merge_private_bfd_data 26486d7f5d3SJohn Marino 26586d7f5d3SJohn Marino #define _bfd_ecoff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags 26686d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_slurp_armap (bfd *); 26786d7f5d3SJohn Marino #define _bfd_ecoff_slurp_extended_name_table _bfd_slurp_extended_name_table 26886d7f5d3SJohn Marino #define _bfd_ecoff_construct_extended_name_table \ 26986d7f5d3SJohn Marino _bfd_archive_bsd_construct_extended_name_table 27086d7f5d3SJohn Marino #define _bfd_ecoff_truncate_arname bfd_dont_truncate_arname 27186d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_write_armap 27286d7f5d3SJohn Marino (bfd *, unsigned int, struct orl *, unsigned int, int); 27386d7f5d3SJohn Marino #define _bfd_ecoff_read_ar_hdr _bfd_generic_read_ar_hdr 27486d7f5d3SJohn Marino #define _bfd_ecoff_write_ar_hdr _bfd_generic_write_ar_hdr 27586d7f5d3SJohn Marino #define _bfd_ecoff_openr_next_archived_file \ 27686d7f5d3SJohn Marino bfd_generic_openr_next_archived_file 27786d7f5d3SJohn Marino #define _bfd_ecoff_get_elt_at_index _bfd_generic_get_elt_at_index 27886d7f5d3SJohn Marino #define _bfd_ecoff_generic_stat_arch_elt bfd_generic_stat_arch_elt 27986d7f5d3SJohn Marino #define _bfd_ecoff_update_armap_timestamp bfd_true 28086d7f5d3SJohn Marino #define _bfd_ecoff_bfd_is_target_special_symbol \ 28186d7f5d3SJohn Marino ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) 28286d7f5d3SJohn Marino 28386d7f5d3SJohn Marino extern long _bfd_ecoff_get_symtab_upper_bound (bfd *); 28486d7f5d3SJohn Marino extern long _bfd_ecoff_canonicalize_symtab (bfd *, asymbol **); 28586d7f5d3SJohn Marino extern asymbol *_bfd_ecoff_make_empty_symbol (bfd *); 28686d7f5d3SJohn Marino extern void _bfd_ecoff_print_symbol 28786d7f5d3SJohn Marino (bfd *, void *, asymbol *, bfd_print_symbol_type); 28886d7f5d3SJohn Marino extern void _bfd_ecoff_get_symbol_info 28986d7f5d3SJohn Marino (bfd *, asymbol *, symbol_info *); 29086d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_bfd_is_local_label_name 29186d7f5d3SJohn Marino (bfd *, const char *); 29286d7f5d3SJohn Marino #define _bfd_ecoff_get_lineno _bfd_nosymbols_get_lineno 29386d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_find_nearest_line 29486d7f5d3SJohn Marino (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, 29586d7f5d3SJohn Marino unsigned int *); 29686d7f5d3SJohn Marino #define _bfd_ecoff_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol 29786d7f5d3SJohn Marino #define _bfd_ecoff_read_minisymbols _bfd_generic_read_minisymbols 29886d7f5d3SJohn Marino #define _bfd_ecoff_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol 29986d7f5d3SJohn Marino #define _bfd_ecoff_find_inliner_info _bfd_nosymbols_find_inliner_info 30086d7f5d3SJohn Marino 30186d7f5d3SJohn Marino #define _bfd_ecoff_get_reloc_upper_bound coff_get_reloc_upper_bound 30286d7f5d3SJohn Marino extern long _bfd_ecoff_canonicalize_reloc 30386d7f5d3SJohn Marino (bfd *, asection *, arelent **, asymbol **symbols); 30486d7f5d3SJohn Marino /* ecoff_bfd_reloc_type_lookup defined by backend. */ 30586d7f5d3SJohn Marino 30686d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_set_arch_mach 30786d7f5d3SJohn Marino (bfd *, enum bfd_architecture, unsigned long); 30886d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_set_section_contents 30986d7f5d3SJohn Marino (bfd *, asection *, const void * location, file_ptr, bfd_size_type); 31086d7f5d3SJohn Marino 31186d7f5d3SJohn Marino extern int _bfd_ecoff_sizeof_headers (bfd *, struct bfd_link_info *); 31286d7f5d3SJohn Marino /* ecoff_bfd_get_relocated_section_contents defined by backend. */ 31386d7f5d3SJohn Marino /* ecoff_bfd_relax_section defined by backend. */ 31486d7f5d3SJohn Marino extern struct bfd_link_hash_table *_bfd_ecoff_bfd_link_hash_table_create 31586d7f5d3SJohn Marino (bfd *); 31686d7f5d3SJohn Marino #define _bfd_ecoff_bfd_link_hash_table_free _bfd_generic_link_hash_table_free 31786d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_bfd_link_add_symbols 31886d7f5d3SJohn Marino (bfd *, struct bfd_link_info *); 31986d7f5d3SJohn Marino #define _bfd_ecoff_bfd_link_just_syms _bfd_generic_link_just_syms 32086d7f5d3SJohn Marino #define _bfd_ecoff_bfd_copy_link_hash_symbol_type \ 32186d7f5d3SJohn Marino _bfd_generic_copy_link_hash_symbol_type 32286d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_bfd_final_link 32386d7f5d3SJohn Marino (bfd *, struct bfd_link_info *); 32486d7f5d3SJohn Marino 32586d7f5d3SJohn Marino /* Hook functions for the generic COFF section reading code. */ 32686d7f5d3SJohn Marino 32786d7f5d3SJohn Marino extern void * _bfd_ecoff_mkobject_hook (bfd *, void *, void *); 32886d7f5d3SJohn Marino #define _bfd_ecoff_set_alignment_hook \ 32986d7f5d3SJohn Marino ((void (*) (bfd *, asection *, void *)) bfd_void) 33086d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_set_arch_mach_hook 33186d7f5d3SJohn Marino (bfd *, void *); 33286d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_no_long_sections 33386d7f5d3SJohn Marino (bfd *abfd, int enable); 33486d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_styp_to_sec_flags 33586d7f5d3SJohn Marino (bfd *, void *, const char *, asection *, flagword *); 33686d7f5d3SJohn Marino extern bfd_boolean _bfd_ecoff_slurp_symbol_table (bfd *); 33786d7f5d3SJohn Marino 33886d7f5d3SJohn Marino /* ECOFF auxiliary information swapping routines. These are the same 33986d7f5d3SJohn Marino for all ECOFF targets, so they are defined in ecofflink.c. */ 34086d7f5d3SJohn Marino 34186d7f5d3SJohn Marino extern void _bfd_ecoff_swap_tir_in 34286d7f5d3SJohn Marino (int, const struct tir_ext *, TIR *); 34386d7f5d3SJohn Marino extern void _bfd_ecoff_swap_tir_out 34486d7f5d3SJohn Marino (int, const TIR *, struct tir_ext *); 34586d7f5d3SJohn Marino extern void _bfd_ecoff_swap_rndx_in 34686d7f5d3SJohn Marino (int, const struct rndx_ext *, RNDXR *); 34786d7f5d3SJohn Marino extern void _bfd_ecoff_swap_rndx_out 34886d7f5d3SJohn Marino (int, const RNDXR *, struct rndx_ext *); 349