libcoff-in.h revision 38889
133965Sjdp/* BFD COFF object file private structure. 238889Sjdp Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 333965Sjdp Free Software Foundation, Inc. 433965Sjdp Written by Cygnus Support. 533965Sjdp 633965Sjdp** NOTE: libcoff.h is a GENERATED file. Don't change it; instead, 733965Sjdp** change libcoff-in.h or coffcode.h. 833965Sjdp 933965SjdpThis file is part of BFD, the Binary File Descriptor library. 1033965Sjdp 1133965SjdpThis program is free software; you can redistribute it and/or modify 1233965Sjdpit under the terms of the GNU General Public License as published by 1333965Sjdpthe Free Software Foundation; either version 2 of the License, or 1433965Sjdp(at your option) any later version. 1533965Sjdp 1633965SjdpThis program is distributed in the hope that it will be useful, 1733965Sjdpbut WITHOUT ANY WARRANTY; without even the implied warranty of 1833965SjdpMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1933965SjdpGNU General Public License for more details. 2033965Sjdp 2133965SjdpYou should have received a copy of the GNU General Public License 2233965Sjdpalong with this program; if not, write to the Free Software 2333965SjdpFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 2433965Sjdp 2533965Sjdp#include "bfdlink.h" 2633965Sjdp 2733965Sjdp/* Object file tdata; access macros */ 2833965Sjdp 2933965Sjdp#define coff_data(bfd) ((bfd)->tdata.coff_obj_data) 3033965Sjdp#define exec_hdr(bfd) (coff_data(bfd)->hdr) 3133965Sjdp#define obj_pe(bfd) (coff_data(bfd)->pe) 3233965Sjdp#define obj_symbols(bfd) (coff_data(bfd)->symbols) 3333965Sjdp#define obj_sym_filepos(bfd) (coff_data(bfd)->sym_filepos) 3433965Sjdp 3533965Sjdp#define obj_relocbase(bfd) (coff_data(bfd)->relocbase) 3633965Sjdp#define obj_raw_syments(bfd) (coff_data(bfd)->raw_syments) 3733965Sjdp#define obj_raw_syment_count(bfd) (coff_data(bfd)->raw_syment_count) 3833965Sjdp#define obj_convert(bfd) (coff_data(bfd)->conversion_table) 3933965Sjdp#define obj_conv_table_size(bfd) (coff_data(bfd)->conv_table_size) 4033965Sjdp 4133965Sjdp#define obj_coff_external_syms(bfd) (coff_data (bfd)->external_syms) 4233965Sjdp#define obj_coff_keep_syms(bfd) (coff_data (bfd)->keep_syms) 4333965Sjdp#define obj_coff_strings(bfd) (coff_data (bfd)->strings) 4433965Sjdp#define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings) 4533965Sjdp#define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes) 4633965Sjdp 4733965Sjdp#define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map) 4833965Sjdp 4933965Sjdp/* `Tdata' information kept for COFF files. */ 5033965Sjdp 5133965Sjdptypedef struct coff_tdata 5233965Sjdp{ 5333965Sjdp struct coff_symbol_struct *symbols; /* symtab for input bfd */ 5433965Sjdp unsigned int *conversion_table; 5533965Sjdp int conv_table_size; 5633965Sjdp file_ptr sym_filepos; 5733965Sjdp 5833965Sjdp struct coff_ptr_struct *raw_syments; 5933965Sjdp unsigned int raw_syment_count; 6033965Sjdp 6133965Sjdp /* These are only valid once writing has begun */ 6233965Sjdp long int relocbase; 6333965Sjdp 6433965Sjdp /* These members communicate important constants about the symbol table 6533965Sjdp to GDB's symbol-reading code. These `constants' unfortunately vary 6633965Sjdp from coff implementation to implementation... */ 6733965Sjdp unsigned local_n_btmask; 6833965Sjdp unsigned local_n_btshft; 6933965Sjdp unsigned local_n_tmask; 7033965Sjdp unsigned local_n_tshift; 7133965Sjdp unsigned local_symesz; 7233965Sjdp unsigned local_auxesz; 7333965Sjdp unsigned local_linesz; 7433965Sjdp 7533965Sjdp /* The unswapped external symbols. May be NULL. Read by 7633965Sjdp _bfd_coff_get_external_symbols. */ 7733965Sjdp PTR external_syms; 7833965Sjdp /* If this is true, the external_syms may not be freed. */ 7933965Sjdp boolean keep_syms; 8033965Sjdp 8133965Sjdp /* The string table. May be NULL. Read by 8233965Sjdp _bfd_coff_read_string_table. */ 8333965Sjdp char *strings; 8433965Sjdp /* If this is true, the strings may not be freed. */ 8533965Sjdp boolean keep_strings; 8633965Sjdp 8733965Sjdp /* is this a PE format coff file */ 8833965Sjdp int pe; 8933965Sjdp /* Used by the COFF backend linker. */ 9033965Sjdp struct coff_link_hash_entry **sym_hashes; 9133965Sjdp 9233965Sjdp /* used by the pe linker for PowerPC */ 9333965Sjdp int *local_toc_sym_map; 9433965Sjdp 9533965Sjdp struct bfd_link_info *link_info; 9633965Sjdp 9733965Sjdp /* Used by coff_find_nearest_line. */ 9833965Sjdp PTR line_info; 9938889Sjdp 10038889Sjdp /* Copy of some of the f_flags bits in the COFF filehdr structure, 10138889Sjdp used by ARM code. */ 10238889Sjdp flagword flags; 10338889Sjdp 10433965Sjdp} coff_data_type; 10533965Sjdp 10633965Sjdp/* Tdata for pe image files. */ 10733965Sjdptypedef struct pe_tdata 10833965Sjdp{ 10933965Sjdp coff_data_type coff; 11033965Sjdp struct internal_extra_pe_aouthdr pe_opthdr; 11133965Sjdp int dll; 11233965Sjdp int has_reloc_section; 11333965Sjdp boolean (*in_reloc_p) PARAMS((bfd *, reloc_howto_type *)); 11433965Sjdp flagword real_flags; 11533965Sjdp} pe_data_type; 11633965Sjdp 11733965Sjdp#define pe_data(bfd) ((bfd)->tdata.pe_obj_data) 11833965Sjdp 11933965Sjdp/* Tdata for XCOFF files. */ 12033965Sjdp 12133965Sjdpstruct xcoff_tdata 12233965Sjdp{ 12333965Sjdp /* Basic COFF information. */ 12433965Sjdp coff_data_type coff; 12533965Sjdp 12633965Sjdp /* True if a large a.out header should be generated. */ 12733965Sjdp boolean full_aouthdr; 12833965Sjdp 12933965Sjdp /* TOC value. */ 13033965Sjdp bfd_vma toc; 13133965Sjdp 13233965Sjdp /* Index of section holding TOC. */ 13333965Sjdp int sntoc; 13433965Sjdp 13533965Sjdp /* Index of section holding entry point. */ 13633965Sjdp int snentry; 13733965Sjdp 13833965Sjdp /* .text alignment from optional header. */ 13933965Sjdp int text_align_power; 14033965Sjdp 14133965Sjdp /* .data alignment from optional header. */ 14233965Sjdp int data_align_power; 14333965Sjdp 14433965Sjdp /* modtype from optional header. */ 14533965Sjdp short modtype; 14633965Sjdp 14733965Sjdp /* cputype from optional header. */ 14833965Sjdp short cputype; 14933965Sjdp 15033965Sjdp /* maxdata from optional header. */ 15133965Sjdp bfd_size_type maxdata; 15233965Sjdp 15333965Sjdp /* maxstack from optional header. */ 15433965Sjdp bfd_size_type maxstack; 15533965Sjdp 15633965Sjdp /* Used by the XCOFF backend linker. */ 15733965Sjdp asection **csects; 15833965Sjdp unsigned long *debug_indices; 15933965Sjdp unsigned int import_file_id; 16033965Sjdp}; 16133965Sjdp 16233965Sjdp#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data) 16333965Sjdp 16433965Sjdp/* We take the address of the first element of a asymbol to ensure that the 16533965Sjdp * macro is only ever applied to an asymbol. */ 16633965Sjdp#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd))) 16733965Sjdp 16833965Sjdp/* The used_by_bfd field of a section may be set to a pointer to this 16933965Sjdp structure. */ 17033965Sjdp 17133965Sjdpstruct coff_section_tdata 17233965Sjdp{ 17333965Sjdp /* The relocs, swapped into COFF internal form. This may be NULL. */ 17433965Sjdp struct internal_reloc *relocs; 17533965Sjdp /* If this is true, the relocs entry may not be freed. */ 17633965Sjdp boolean keep_relocs; 17733965Sjdp /* The section contents. This may be NULL. */ 17833965Sjdp bfd_byte *contents; 17933965Sjdp /* If this is true, the contents entry may not be freed. */ 18033965Sjdp boolean keep_contents; 18133965Sjdp /* Information cached by coff_find_nearest_line. */ 18233965Sjdp bfd_vma offset; 18333965Sjdp unsigned int i; 18433965Sjdp const char *function; 18533965Sjdp int line_base; 18633965Sjdp /* A pointer used for .stab linking optimizations. */ 18733965Sjdp PTR stab_info; 18833965Sjdp /* Available for individual backends. */ 18933965Sjdp PTR tdata; 19033965Sjdp}; 19133965Sjdp 19233965Sjdp/* An accessor macro for the coff_section_tdata structure. */ 19333965Sjdp#define coff_section_data(abfd, sec) \ 19433965Sjdp ((struct coff_section_tdata *) (sec)->used_by_bfd) 19533965Sjdp 19633965Sjdp/* Tdata for sections in XCOFF files. This is used by the linker. */ 19733965Sjdp 19833965Sjdpstruct xcoff_section_tdata 19933965Sjdp{ 20033965Sjdp /* Used for XCOFF csects created by the linker; points to the real 20133965Sjdp XCOFF section which contains this csect. */ 20233965Sjdp asection *enclosing; 20333965Sjdp /* The lineno_count field for the enclosing section, because we are 20433965Sjdp going to clobber it there. */ 20533965Sjdp unsigned int lineno_count; 20633965Sjdp /* The first and one past the last symbol indices for symbols used 20733965Sjdp by this csect. */ 20833965Sjdp unsigned long first_symndx; 20933965Sjdp unsigned long last_symndx; 21033965Sjdp}; 21133965Sjdp 21233965Sjdp/* An accessor macro the xcoff_section_tdata structure. */ 21333965Sjdp#define xcoff_section_data(abfd, sec) \ 21433965Sjdp ((struct xcoff_section_tdata *) coff_section_data ((abfd), (sec))->tdata) 21533965Sjdp 21633965Sjdp/* Tdata for sections in PEI image files. */ 21733965Sjdp 21833965Sjdpstruct pei_section_tdata 21933965Sjdp{ 22033965Sjdp /* The virtual size of the section. */ 22133965Sjdp bfd_size_type virt_size; 22233965Sjdp}; 22333965Sjdp 22433965Sjdp/* An accessor macro for the pei_section_tdata structure. */ 22533965Sjdp#define pei_section_data(abfd, sec) \ 22633965Sjdp ((struct pei_section_tdata *) coff_section_data ((abfd), (sec))->tdata) 22733965Sjdp 22833965Sjdp/* COFF linker hash table entries. */ 22933965Sjdp 23033965Sjdpstruct coff_link_hash_entry 23133965Sjdp{ 23233965Sjdp struct bfd_link_hash_entry root; 23333965Sjdp 23433965Sjdp /* Symbol index in output file. Set to -1 initially. Set to -2 if 23533965Sjdp there is a reloc against this symbol. */ 23633965Sjdp long indx; 23733965Sjdp 23833965Sjdp /* Symbol type. */ 23933965Sjdp unsigned short type; 24033965Sjdp 24133965Sjdp /* Symbol class. */ 24233965Sjdp unsigned char class; 24333965Sjdp 24433965Sjdp /* Number of auxiliary entries. */ 24533965Sjdp char numaux; 24633965Sjdp 24733965Sjdp /* BFD to take auxiliary entries from. */ 24833965Sjdp bfd *auxbfd; 24933965Sjdp 25033965Sjdp /* Pointer to array of auxiliary entries, if any. */ 25133965Sjdp union internal_auxent *aux; 25233965Sjdp}; 25333965Sjdp 25433965Sjdp/* COFF linker hash table. */ 25533965Sjdp 25633965Sjdpstruct coff_link_hash_table 25733965Sjdp{ 25833965Sjdp struct bfd_link_hash_table root; 25933965Sjdp /* A pointer to information used to link stabs in sections. */ 26033965Sjdp PTR stab_info; 26133965Sjdp}; 26233965Sjdp 26333965Sjdp/* Look up an entry in a COFF linker hash table. */ 26433965Sjdp 26533965Sjdp#define coff_link_hash_lookup(table, string, create, copy, follow) \ 26633965Sjdp ((struct coff_link_hash_entry *) \ 26733965Sjdp bfd_link_hash_lookup (&(table)->root, (string), (create), \ 26833965Sjdp (copy), (follow))) 26933965Sjdp 27033965Sjdp/* Traverse a COFF linker hash table. */ 27133965Sjdp 27233965Sjdp#define coff_link_hash_traverse(table, func, info) \ 27333965Sjdp (bfd_link_hash_traverse \ 27433965Sjdp (&(table)->root, \ 27533965Sjdp (boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \ 27633965Sjdp (info))) 27733965Sjdp 27833965Sjdp/* Get the COFF linker hash table from a link_info structure. */ 27933965Sjdp 28033965Sjdp#define coff_hash_table(p) ((struct coff_link_hash_table *) ((p)->hash)) 28133965Sjdp 28233965Sjdp/* Functions in coffgen.c. */ 28333965Sjdpextern const bfd_target *coff_object_p PARAMS ((bfd *)); 28433965Sjdpextern struct sec *coff_section_from_bfd_index PARAMS ((bfd *, int)); 28533965Sjdpextern long coff_get_symtab_upper_bound PARAMS ((bfd *)); 28633965Sjdpextern long coff_get_symtab PARAMS ((bfd *, asymbol **)); 28733965Sjdpextern int coff_count_linenumbers PARAMS ((bfd *)); 28833965Sjdpextern struct coff_symbol_struct *coff_symbol_from PARAMS ((bfd *, asymbol *)); 28933965Sjdpextern boolean coff_renumber_symbols PARAMS ((bfd *, int *)); 29033965Sjdpextern void coff_mangle_symbols PARAMS ((bfd *)); 29133965Sjdpextern boolean coff_write_symbols PARAMS ((bfd *)); 29233965Sjdpextern boolean coff_write_linenumbers PARAMS ((bfd *)); 29333965Sjdpextern alent *coff_get_lineno PARAMS ((bfd *, asymbol *)); 29433965Sjdpextern asymbol *coff_section_symbol PARAMS ((bfd *, char *)); 29533965Sjdpextern boolean _bfd_coff_get_external_symbols PARAMS ((bfd *)); 29633965Sjdpextern const char *_bfd_coff_read_string_table PARAMS ((bfd *)); 29733965Sjdpextern boolean _bfd_coff_free_symbols PARAMS ((bfd *)); 29833965Sjdpextern struct coff_ptr_struct *coff_get_normalized_symtab PARAMS ((bfd *)); 29933965Sjdpextern long coff_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr)); 30033965Sjdpextern asymbol *coff_make_empty_symbol PARAMS ((bfd *)); 30133965Sjdpextern void coff_print_symbol PARAMS ((bfd *, PTR filep, asymbol *, 30233965Sjdp bfd_print_symbol_type how)); 30333965Sjdpextern void coff_get_symbol_info PARAMS ((bfd *, asymbol *, 30433965Sjdp symbol_info *ret)); 30533965Sjdpextern boolean _bfd_coff_is_local_label_name PARAMS ((bfd *, const char *)); 30633965Sjdpextern asymbol *coff_bfd_make_debug_symbol PARAMS ((bfd *, PTR, 30733965Sjdp unsigned long)); 30833965Sjdpextern boolean coff_find_nearest_line PARAMS ((bfd *, 30933965Sjdp asection *, 31033965Sjdp asymbol **, 31133965Sjdp bfd_vma offset, 31233965Sjdp CONST char **filename_ptr, 31333965Sjdp CONST char **functionname_ptr, 31433965Sjdp unsigned int *line_ptr)); 31533965Sjdpextern int coff_sizeof_headers PARAMS ((bfd *, boolean reloc)); 31633965Sjdpextern boolean bfd_coff_reloc16_relax_section 31733965Sjdp PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *)); 31833965Sjdpextern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents 31933965Sjdp PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, 32033965Sjdp bfd_byte *, boolean relocateable, asymbol **)); 32133965Sjdpextern bfd_vma bfd_coff_reloc16_get_value PARAMS ((arelent *, 32233965Sjdp struct bfd_link_info *, 32333965Sjdp asection *)); 32433965Sjdpextern void bfd_perform_slip PARAMS ((bfd *abfd, unsigned int slip, 32533965Sjdp asection *input_section, 32633965Sjdp bfd_vma val)); 32733965Sjdp 32833965Sjdp/* Functions and types in cofflink.c. */ 32933965Sjdp 33033965Sjdp#define STRING_SIZE_SIZE (4) 33133965Sjdp 33233965Sjdp/* We use a hash table to merge identical enum, struct, and union 33333965Sjdp definitions in the linker. */ 33433965Sjdp 33533965Sjdp/* Information we keep for a single element (an enum value, a 33633965Sjdp structure or union field) in the debug merge hash table. */ 33733965Sjdp 33833965Sjdpstruct coff_debug_merge_element 33933965Sjdp{ 34033965Sjdp /* Next element. */ 34133965Sjdp struct coff_debug_merge_element *next; 34233965Sjdp 34333965Sjdp /* Name. */ 34433965Sjdp const char *name; 34533965Sjdp 34633965Sjdp /* Type. */ 34733965Sjdp unsigned int type; 34833965Sjdp 34933965Sjdp /* Symbol index for complex type. */ 35033965Sjdp long tagndx; 35133965Sjdp}; 35233965Sjdp 35333965Sjdp/* A linked list of debug merge entries for a given name. */ 35433965Sjdp 35533965Sjdpstruct coff_debug_merge_type 35633965Sjdp{ 35733965Sjdp /* Next type with the same name. */ 35833965Sjdp struct coff_debug_merge_type *next; 35933965Sjdp 36033965Sjdp /* Class of type. */ 36133965Sjdp int class; 36233965Sjdp 36333965Sjdp /* Symbol index where this type is defined. */ 36433965Sjdp long indx; 36533965Sjdp 36633965Sjdp /* List of elements. */ 36733965Sjdp struct coff_debug_merge_element *elements; 36833965Sjdp}; 36933965Sjdp 37033965Sjdp/* Information we store in the debug merge hash table. */ 37133965Sjdp 37233965Sjdpstruct coff_debug_merge_hash_entry 37333965Sjdp{ 37433965Sjdp struct bfd_hash_entry root; 37533965Sjdp 37633965Sjdp /* A list of types with this name. */ 37733965Sjdp struct coff_debug_merge_type *types; 37833965Sjdp}; 37933965Sjdp 38033965Sjdp/* The debug merge hash table. */ 38133965Sjdp 38233965Sjdpstruct coff_debug_merge_hash_table 38333965Sjdp{ 38433965Sjdp struct bfd_hash_table root; 38533965Sjdp}; 38633965Sjdp 38733965Sjdp/* Initialize a COFF debug merge hash table. */ 38833965Sjdp 38933965Sjdp#define coff_debug_merge_hash_table_init(table) \ 39033965Sjdp (bfd_hash_table_init (&(table)->root, _bfd_coff_debug_merge_hash_newfunc)) 39133965Sjdp 39233965Sjdp/* Free a COFF debug merge hash table. */ 39333965Sjdp 39433965Sjdp#define coff_debug_merge_hash_table_free(table) \ 39533965Sjdp (bfd_hash_table_free (&(table)->root)) 39633965Sjdp 39733965Sjdp/* Look up an entry in a COFF debug merge hash table. */ 39833965Sjdp 39933965Sjdp#define coff_debug_merge_hash_lookup(table, string, create, copy) \ 40033965Sjdp ((struct coff_debug_merge_hash_entry *) \ 40133965Sjdp bfd_hash_lookup (&(table)->root, (string), (create), (copy))) 40233965Sjdp 40333965Sjdp/* Information we keep for each section in the output file when doing 40433965Sjdp a relocateable link. */ 40533965Sjdp 40633965Sjdpstruct coff_link_section_info 40733965Sjdp{ 40833965Sjdp /* The relocs to be output. */ 40933965Sjdp struct internal_reloc *relocs; 41033965Sjdp /* For each reloc against a global symbol whose index was not known 41133965Sjdp when the reloc was handled, the global hash table entry. */ 41233965Sjdp struct coff_link_hash_entry **rel_hashes; 41333965Sjdp}; 41433965Sjdp 41533965Sjdp/* Information that we pass around while doing the final link step. */ 41633965Sjdp 41733965Sjdpstruct coff_final_link_info 41833965Sjdp{ 41933965Sjdp /* General link information. */ 42033965Sjdp struct bfd_link_info *info; 42133965Sjdp /* Output BFD. */ 42233965Sjdp bfd *output_bfd; 42333965Sjdp /* Used to indicate failure in traversal routine. */ 42433965Sjdp boolean failed; 42538889Sjdp /* If doing "task linking" set only during the time when we want the 42638889Sjdp global symbol writer to convert the storage class of defined global 42738889Sjdp symbols from global to static. */ 42838889Sjdp boolean global_to_static; 42933965Sjdp /* Hash table for long symbol names. */ 43033965Sjdp struct bfd_strtab_hash *strtab; 43133965Sjdp /* When doing a relocateable link, an array of information kept for 43233965Sjdp each output section, indexed by the target_index field. */ 43333965Sjdp struct coff_link_section_info *section_info; 43433965Sjdp /* Symbol index of last C_FILE symbol (-1 if none). */ 43533965Sjdp long last_file_index; 43633965Sjdp /* Contents of last C_FILE symbol. */ 43733965Sjdp struct internal_syment last_file; 43833965Sjdp /* Symbol index of first aux entry of last .bf symbol with an empty 43933965Sjdp endndx field (-1 if none). */ 44033965Sjdp long last_bf_index; 44133965Sjdp /* Contents of last_bf_index aux entry. */ 44233965Sjdp union internal_auxent last_bf; 44333965Sjdp /* Hash table used to merge debug information. */ 44433965Sjdp struct coff_debug_merge_hash_table debug_merge; 44533965Sjdp /* Buffer large enough to hold swapped symbols of any input file. */ 44633965Sjdp struct internal_syment *internal_syms; 44733965Sjdp /* Buffer large enough to hold sections of symbols of any input file. */ 44833965Sjdp asection **sec_ptrs; 44933965Sjdp /* Buffer large enough to hold output indices of symbols of any 45033965Sjdp input file. */ 45133965Sjdp long *sym_indices; 45233965Sjdp /* Buffer large enough to hold output symbols for any input file. */ 45333965Sjdp bfd_byte *outsyms; 45433965Sjdp /* Buffer large enough to hold external line numbers for any input 45533965Sjdp section. */ 45633965Sjdp bfd_byte *linenos; 45733965Sjdp /* Buffer large enough to hold any input section. */ 45833965Sjdp bfd_byte *contents; 45933965Sjdp /* Buffer large enough to hold external relocs of any input section. */ 46033965Sjdp bfd_byte *external_relocs; 46133965Sjdp /* Buffer large enough to hold swapped relocs of any input section. */ 46233965Sjdp struct internal_reloc *internal_relocs; 46333965Sjdp}; 46433965Sjdp 46533965Sjdpextern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc 46633965Sjdp PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); 46733965Sjdpextern boolean _bfd_coff_link_hash_table_init 46833965Sjdp PARAMS ((struct coff_link_hash_table *, bfd *, 46933965Sjdp struct bfd_hash_entry *(*) (struct bfd_hash_entry *, 47033965Sjdp struct bfd_hash_table *, 47133965Sjdp const char *))); 47233965Sjdpextern struct bfd_link_hash_table *_bfd_coff_link_hash_table_create 47333965Sjdp PARAMS ((bfd *)); 47433965Sjdpextern const char *_bfd_coff_internal_syment_name 47533965Sjdp PARAMS ((bfd *, const struct internal_syment *, char *)); 47633965Sjdpextern boolean _bfd_coff_link_add_symbols 47733965Sjdp PARAMS ((bfd *, struct bfd_link_info *)); 47833965Sjdpextern boolean _bfd_coff_final_link 47933965Sjdp PARAMS ((bfd *, struct bfd_link_info *)); 48033965Sjdpextern struct internal_reloc *_bfd_coff_read_internal_relocs 48133965Sjdp PARAMS ((bfd *, asection *, boolean, bfd_byte *, boolean, 48233965Sjdp struct internal_reloc *)); 48333965Sjdpextern boolean _bfd_coff_generic_relocate_section 48433965Sjdp PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, 48533965Sjdp struct internal_reloc *, struct internal_syment *, asection **)); 48633965Sjdp 48733965Sjdpextern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc 48833965Sjdp PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); 48933965Sjdpextern boolean _bfd_coff_write_global_sym 49033965Sjdp PARAMS ((struct coff_link_hash_entry *, PTR)); 49138889Sjdpextern boolean _bfd_coff_write_task_globals 49238889Sjdp PARAMS ((struct coff_link_hash_entry *, PTR)); 49333965Sjdpextern boolean _bfd_coff_link_input_bfd 49433965Sjdp PARAMS ((struct coff_final_link_info *, bfd *)); 49533965Sjdpextern boolean _bfd_coff_reloc_link_order 49633965Sjdp PARAMS ((bfd *, struct coff_final_link_info *, asection *, 49733965Sjdp struct bfd_link_order *)); 49833965Sjdp 49933965Sjdp 50033965Sjdp#define coff_get_section_contents_in_window \ 50133965Sjdp _bfd_generic_get_section_contents_in_window 50233965Sjdp 50333965Sjdp/* Functions in xcofflink.c. */ 50433965Sjdp 50533965Sjdpextern long _bfd_xcoff_get_dynamic_symtab_upper_bound PARAMS ((bfd *)); 50633965Sjdpextern long _bfd_xcoff_canonicalize_dynamic_symtab 50733965Sjdp PARAMS ((bfd *, asymbol **)); 50833965Sjdpextern long _bfd_xcoff_get_dynamic_reloc_upper_bound PARAMS ((bfd *)); 50933965Sjdpextern long _bfd_xcoff_canonicalize_dynamic_reloc 51033965Sjdp PARAMS ((bfd *, arelent **, asymbol **)); 51133965Sjdpextern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create 51233965Sjdp PARAMS ((bfd *)); 51333965Sjdpextern boolean _bfd_xcoff_bfd_link_add_symbols 51433965Sjdp PARAMS ((bfd *, struct bfd_link_info *)); 51533965Sjdpextern boolean _bfd_xcoff_bfd_final_link 51633965Sjdp PARAMS ((bfd *, struct bfd_link_info *)); 51733965Sjdpextern boolean _bfd_ppc_xcoff_relocate_section 51833965Sjdp PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, 51933965Sjdp struct internal_reloc *, struct internal_syment *, asection **)); 52033965Sjdp 52133965Sjdp/* Functions in coff-ppc.c. FIXME: These are called be pe.em in the 52233965Sjdp linker, and so should start with bfd and be declared in bfd.h. */ 52333965Sjdp 52433965Sjdpextern boolean ppc_allocate_toc_section PARAMS ((struct bfd_link_info *)); 52533965Sjdpextern boolean ppc_process_before_allocation 52633965Sjdp PARAMS ((bfd *, struct bfd_link_info *)); 52733965Sjdp 52833965Sjdp/* And more taken from the source .. */ 52933965Sjdp 530