X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fbfd-in.h;h=e671ee7d23e5eb68c796c112be4ca3709d6b52e5;hb=d504ffc8519a0f1674715a8d55975c762c3ca1df;hp=e800a922119b4e13bb7836e24c14bfb8be0d9099;hpb=c58b95236ce4c9345c4fa76e7ef16762e5229380;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index e800a92211..e671ee7d23 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -1,7 +1,8 @@ /* Main header file for the bfd library -- portable access to object files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -19,7 +20,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __BFD_H_SEEN__ #define __BFD_H_SEEN__ @@ -42,6 +43,30 @@ extern "C" { #endif #endif +/* This is a utility macro to handle the situation where the code + wants to place a constant string into the code, followed by a + comma and then the length of the string. Doing this by hand + is error prone, so using this macro is safer. The macro will + also safely handle the case where a NULL is passed as the arg. */ +#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0) +/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro + to create the arguments to another macro, since the preprocessor + will mis-count the number of arguments to the outer macro (by not + evaluating STRING_COMMA_LEN and so missing the comma). This is a + problem for example when trying to use STRING_COMMA_LEN to build + the arguments to the strncmp() macro. Hence this alternative + definition of strncmp is provided here. + + Note - these macros do NOT work if STR2 is not a constant string. */ +#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0) + /* strcpy() can have a similar problem, but since we know we are + copying a constant string, we can use memcpy which will be faster + since there is no need to check for a NUL byte inside STR. We + can also save time if we do not need to copy the terminating NUL. */ +#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1) +#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) + + /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ @@ -51,9 +76,12 @@ extern "C" { #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ +#define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@ #if @BFD_HOST_64_BIT_DEFINED@ #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ #define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@ +typedef BFD_HOST_64_BIT bfd_int64_t; +typedef BFD_HOST_U_64_BIT bfd_uint64_t; #endif #if BFD_ARCH_SIZE >= 64 @@ -86,34 +114,6 @@ typedef int bfd_boolean; #define FALSE 0 #define TRUE 1 -#if 0 -/* Poison. */ -#undef false -#undef true -#define false dont_use_false_in_bfd -#define true dont_use_true_in_bfd -#endif - -/* Support for different sizes of target format ints and addresses. - If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be - set to 1 above. Otherwise, if gcc is being used, this code will - use gcc's "long long" type. Otherwise, BFD_HOST_64_BIT must be - defined above. */ - -#ifndef BFD_HOST_64_BIT -# if BFD_HOST_64BIT_LONG -# define BFD_HOST_64_BIT long -# define BFD_HOST_U_64_BIT unsigned long -# else -# ifdef __GNUC__ -# if __GNUC__ >= 2 -# define BFD_HOST_64_BIT long long -# define BFD_HOST_U_64_BIT unsigned long long -# endif /* __GNUC__ >= 2 */ -# endif /* ! defined (__GNUC__) */ -# endif /* ! BFD_HOST_64BIT_LONG */ -#endif /* ! defined (BFD_HOST_64_BIT) */ - #ifdef BFD64 #ifndef BFD_HOST_64_BIT @@ -161,16 +161,22 @@ typedef unsigned long bfd_size_type; #endif /* not BFD64 */ -/* A pointer to a position in a file. */ -/* FIXME: This should be using off_t from . - For now, try to avoid breaking stuff by not including here. - This will break on systems with 64-bit file offsets (e.g. 4.4BSD). - Probably the best long-term answer is to avoid using file_ptr AND off_t - in this header file, and to handle this in the BFD implementation - rather than in its interface. */ -/* typedef off_t file_ptr; */ -typedef bfd_signed_vma file_ptr; -typedef bfd_vma ufile_ptr; +#define HALF_BFD_SIZE_TYPE \ + (((bfd_size_type) 1) << (8 * sizeof (bfd_size_type) / 2)) + +#ifndef BFD_HOST_64_BIT +/* Fall back on a 32 bit type. The idea is to make these types always + available for function return types, but in the case that + BFD_HOST_64_BIT is undefined such a function should abort or + otherwise signal an error. */ +typedef bfd_signed_vma bfd_int64_t; +typedef bfd_vma bfd_uint64_t; +#endif + +/* An offset into a file. BFD always uses the largest possible offset + based on the build time availability of fseek, fseeko, or fseeko64. */ +typedef @bfd_file_ptr@ file_ptr; +typedef unsigned @bfd_file_ptr@ ufile_ptr; extern void bfd_sprintf_vma (bfd *, char *, bfd_vma); extern void bfd_fprintf_vma (bfd *, void *, bfd_vma); @@ -186,7 +192,7 @@ typedef unsigned char bfd_byte; typedef enum bfd_format { bfd_unknown = 0, /* File format is unknown. */ - bfd_object, /* Linker/assember/compiler output. */ + bfd_object, /* Linker/assembler/compiler output. */ bfd_archive, /* Object archive file. */ bfd_core, /* Core dump. */ bfd_type_end /* Marks the end; don't use it! */ @@ -252,6 +258,10 @@ bfd_format; /* The sections in this BFD specify a memory page. */ #define HAS_LOAD_PAGE 0x1000 + +/* This BFD has been created by the linker and doesn't correspond + to any input file. */ +#define BFD_LINKER_CREATED 0x2000 /* Symbols and relocation. */ @@ -304,7 +314,7 @@ typedef struct lineno_cache_entry unsigned int line_number; /* Linenumber from start of function. */ union { - struct symbol_cache_entry *sym; /* Function name. */ + struct bfd_symbol *sym; /* Function name. */ bfd_vma offset; /* Offset into section. */ } u; } @@ -315,14 +325,15 @@ alent; #define align_power(addr, align) \ (((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align))) -typedef struct sec *sec_ptr; +typedef struct bfd_section *sec_ptr; #define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0) #define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0) #define bfd_get_section_lma(bfd, ptr) ((ptr)->lma + 0) #define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0) #define bfd_section_name(bfd, ptr) ((ptr)->name) -#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr)) +#define bfd_section_size(bfd, ptr) ((ptr)->size) +#define bfd_get_section_size(ptr) ((ptr)->size) #define bfd_section_vma(bfd, ptr) ((ptr)->vma) #define bfd_section_lma(bfd, ptr) ((ptr)->lma) #define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power) @@ -334,6 +345,10 @@ typedef struct sec *sec_ptr; #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) +/* Find the address one past the end of SEC. */ +#define bfd_get_section_limit(bfd, sec) \ + (((sec)->rawsize ? (sec)->rawsize : (sec)->size) \ + / bfd_octets_per_byte (bfd)) typedef struct stat stat_type; @@ -385,6 +400,10 @@ struct bfd_hash_table struct bfd_hash_entry **table; /* The number of slots in the hash table. */ unsigned int size; + /* The number of entries in the hash table. */ + unsigned int count; + /* The size of elements. */ + unsigned int entsize; /* A function used to create new elements in the hash table. The first entry is itself a pointer to an element. When this function is first invoked, this pointer will be NULL. However, @@ -404,7 +423,8 @@ extern bfd_boolean bfd_hash_table_init (struct bfd_hash_table *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, - const char *)); + const char *), + unsigned int); /* Initialize a hash table specifying a size. */ extern bfd_boolean bfd_hash_table_init_n @@ -412,7 +432,7 @@ extern bfd_boolean bfd_hash_table_init_n struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), - unsigned int size); + unsigned int, unsigned int); /* Free up a hash table. */ extern void bfd_hash_table_free @@ -447,6 +467,24 @@ extern void bfd_hash_traverse bfd_boolean (*) (struct bfd_hash_entry *, void *), void *info); +/* Allows the default size of a hash table to be configured. New hash + tables allocated using bfd_hash_table_init will be created with + this size. */ +extern void bfd_hash_set_default_size (bfd_size_type); + +/* This structure is used to keep track of stabs in sections + information while linking. */ + +struct stab_info +{ + /* A hash table used to hold stabs strings. */ + struct bfd_strtab_hash *strings; + /* The header file hash table. */ + struct bfd_hash_table includes; + /* The first .stabstr section. */ + struct bfd_section *stabstr; +}; + #define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table /* User program access to BFD facilities. */ @@ -457,7 +495,7 @@ extern void bfd_hash_traverse extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *); extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *); extern int bfd_seek (bfd *, file_ptr, int); -extern ufile_ptr bfd_tell (bfd *); +extern file_ptr bfd_tell (bfd *); extern int bfd_flush (bfd *); extern int bfd_stat (bfd *, struct stat *); @@ -519,35 +557,40 @@ extern bfd_boolean bfd_cache_close (bfd *abfd); /* NB: This declaration should match the autogenerated one in libbfd.h. */ +extern bfd_boolean bfd_cache_close_all (void); + extern bfd_boolean bfd_record_phdr (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, - bfd_boolean, bfd_boolean, unsigned int, struct sec **); + bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); /* Byte swapping routines. */ -bfd_vma bfd_getb64 (const unsigned char *); -bfd_vma bfd_getl64 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_64 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_64 (const unsigned char *); -bfd_vma bfd_getb32 (const unsigned char *); -bfd_vma bfd_getl32 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_32 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_32 (const unsigned char *); -bfd_vma bfd_getb16 (const unsigned char *); -bfd_vma bfd_getl16 (const unsigned char *); -bfd_signed_vma bfd_getb_signed_16 (const unsigned char *); -bfd_signed_vma bfd_getl_signed_16 (const unsigned char *); -void bfd_putb64 (bfd_vma, unsigned char *); -void bfd_putl64 (bfd_vma, unsigned char *); -void bfd_putb32 (bfd_vma, unsigned char *); -void bfd_putl32 (bfd_vma, unsigned char *); -void bfd_putb16 (bfd_vma, unsigned char *); -void bfd_putl16 (bfd_vma, unsigned char *); +bfd_uint64_t bfd_getb64 (const void *); +bfd_uint64_t bfd_getl64 (const void *); +bfd_int64_t bfd_getb_signed_64 (const void *); +bfd_int64_t bfd_getl_signed_64 (const void *); +bfd_vma bfd_getb32 (const void *); +bfd_vma bfd_getl32 (const void *); +bfd_signed_vma bfd_getb_signed_32 (const void *); +bfd_signed_vma bfd_getl_signed_32 (const void *); +bfd_vma bfd_getb16 (const void *); +bfd_vma bfd_getl16 (const void *); +bfd_signed_vma bfd_getb_signed_16 (const void *); +bfd_signed_vma bfd_getl_signed_16 (const void *); +void bfd_putb64 (bfd_uint64_t, void *); +void bfd_putl64 (bfd_uint64_t, void *); +void bfd_putb32 (bfd_vma, void *); +void bfd_putl32 (bfd_vma, void *); +void bfd_putb16 (bfd_vma, void *); +void bfd_putl16 (bfd_vma, void *); /* Byte swapping routines which take size and endiannes as arguments. */ -bfd_vma bfd_get_bits (bfd_byte *, int, bfd_boolean); -void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean); +bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); +void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); + +extern bfd_boolean bfd_section_already_linked_table_init (void); +extern void bfd_section_already_linked_table_free (void); /* Externally visible ECOFF routines. */ @@ -555,7 +598,7 @@ void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean); struct ecoff_debug_info; struct ecoff_debug_swap; struct ecoff_extr; -struct symbol_cache_entry; +struct bfd_symbol; struct bfd_link_info; struct bfd_link_hash_entry; struct bfd_elf_version_tree; @@ -585,8 +628,8 @@ extern bfd_boolean bfd_ecoff_debug_accumulate_other extern bfd_boolean bfd_ecoff_debug_externals (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct symbol_cache_entry *, struct ecoff_extr *), - void (*set_index) (struct symbol_cache_entry *, bfd_size_type)); + bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), + void (*set_index) (struct bfd_symbol *, bfd_size_type)); extern bfd_boolean bfd_ecoff_debug_one_external (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, const char *name, @@ -601,8 +644,6 @@ extern bfd_boolean bfd_ecoff_write_accumulated_debug (void *handle, bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, struct bfd_link_info *info, file_ptr where); -extern bfd_boolean bfd_mips_ecoff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **); /* Externally visible ELF routines. */ @@ -613,30 +654,47 @@ struct bfd_link_needed_list const char *name; }; +enum dynamic_lib_link_class { + DYN_NORMAL = 0, + DYN_AS_NEEDED = 1, + DYN_DT_NEEDED = 2, + DYN_NO_ADD_NEEDED = 4, + DYN_NO_NEEDED = 8 +}; + +enum notice_asneeded_action { + notice_as_needed, + notice_not_needed, + notice_needed +}; + extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean); + (bfd *, struct bfd_link_info *, const char *, bfd_boolean, + bfd_boolean); extern struct bfd_link_needed_list *bfd_elf_get_needed_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf_get_bfd_needed_list (bfd *, struct bfd_link_needed_list **); -extern bfd_boolean bfd_elf32_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char * const *, - struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *); -extern bfd_boolean bfd_elf64_size_dynamic_sections +extern bfd_boolean bfd_elf_size_dynamic_sections (bfd *, const char *, const char *, const char *, const char * const *, - struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *); + struct bfd_link_info *, struct bfd_section **, + struct bfd_elf_version_tree *); +extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr + (bfd *, struct bfd_link_info *); extern void bfd_elf_set_dt_needed_name (bfd *, const char *); -extern void bfd_elf_set_dt_needed_soname - (bfd *, const char *); extern const char *bfd_elf_get_dt_soname (bfd *); +extern void bfd_elf_set_dyn_lib_class + (bfd *, enum dynamic_lib_link_class); +extern int bfd_elf_get_dyn_lib_class + (bfd *); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf32_discard_info - (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf64_discard_info +extern bfd_boolean bfd_elf_discard_info (bfd *, struct bfd_link_info *); +extern unsigned int _bfd_elf_default_action_discarded + (struct bfd_section *); /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error @@ -668,7 +726,7 @@ extern int bfd_get_elf_phdrs the remote memory. */ extern bfd *bfd_elf_bfd_from_remote_memory (bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep, - int (*target_read_memory) (bfd_vma vma, char *myaddr, int len)); + int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, int len)); /* Return the arch_size field of an elf bfd, or -1 if not elf. */ extern int bfd_get_arch_size @@ -678,10 +736,23 @@ extern int bfd_get_arch_size extern int bfd_get_sign_extend_vma (bfd *); +extern struct bfd_section *_bfd_elf_tls_setup + (bfd *, struct bfd_link_info *); + +extern void _bfd_fix_excluded_sec_syms + (bfd *, struct bfd_link_info *); + +extern unsigned bfd_m68k_mach_to_features (int); + +extern int bfd_m68k_features_to_mach (unsigned); + extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **); -extern bfd_boolean bfd_mips_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **); + (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, + char **); + +extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs + (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, + char **); /* SunOS shared library support routines for the linker. */ @@ -690,7 +761,8 @@ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list extern bfd_boolean bfd_sunos_record_link_assignment (bfd *, struct bfd_link_info *, const char *); extern bfd_boolean bfd_sunos_size_dynamic_sections - (bfd *, struct bfd_link_info *, struct sec **, struct sec **, struct sec **); + (bfd *, struct bfd_link_info *, struct bfd_section **, + struct bfd_section **, struct bfd_section **); /* Linux shared library support routines for the linker. */ @@ -744,7 +816,7 @@ extern bfd_boolean bfd_xcoff_record_link_assignment extern bfd_boolean bfd_xcoff_size_dynamic_sections (bfd *, struct bfd_link_info *, const char *, const char *, unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean); + int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean); extern bfd_boolean bfd_xcoff_link_generate_rtinit (bfd *, const char *, const char *, bfd_boolean); @@ -760,16 +832,16 @@ union internal_auxent; #endif extern bfd_boolean bfd_coff_get_syment - (bfd *, struct symbol_cache_entry *, struct internal_syment *); + (bfd *, struct bfd_symbol *, struct internal_syment *); extern bfd_boolean bfd_coff_get_auxent - (bfd *, struct symbol_cache_entry *, int, union internal_auxent *); + (bfd *, struct bfd_symbol *, int, union internal_auxent *); extern bfd_boolean bfd_coff_set_symbol_class - (bfd *, struct symbol_cache_entry *, unsigned int); + (bfd *, struct bfd_symbol *, unsigned int); extern bfd_boolean bfd_m68k_coff_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **); + (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); /* ARM Interworking support. Called from linker. */ extern bfd_boolean bfd_arm_allocate_interworking_sections @@ -796,7 +868,10 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info *); extern bfd_boolean bfd_elf32_arm_process_before_allocation - (bfd *, struct bfd_link_info *, int); + (bfd *, struct bfd_link_info *); + +void bfd_elf32_arm_set_target_relocs + (struct bfd_link_info *, int, char *, int, int); extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); @@ -804,6 +879,16 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); +/* ELF ARM mapping symbol support */ +#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) +#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) +#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) +#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) +extern bfd_boolean bfd_is_arm_special_symbol_name + (const char * name, int type); + +extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); + /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines (bfd *, bfd *); @@ -816,8 +901,39 @@ extern unsigned int bfd_arm_get_mach_from_notes /* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page - (struct sec *, int); + (struct bfd_section *, int); extern int bfd_ticoff_get_section_load_page - (struct sec *); + (struct bfd_section *); + +/* H8/300 functions. */ +extern bfd_vma bfd_h8300_pad_address + (bfd *, bfd_vma); + +/* IA64 Itanium code generation. Called from linker. */ +extern void bfd_elf32_ia64_after_parse + (int); + +extern void bfd_elf64_ia64_after_parse + (int); + +/* This structure is used for a comdat section, as in PE. A comdat + section is associated with a particular symbol. When the linker + sees a comdat section, it keeps only one of the sections with a + given name and associated with a given symbol. */ + +struct coff_comdat_info +{ + /* The name of the symbol associated with a comdat section. */ + const char *name; + + /* The local symbol table index of the symbol associated with a + comdat section. This is only meaningful to the object file format + specific code; it is not an index into the list returned by + bfd_canonicalize_symtab. */ + long symbol; +}; + +extern struct coff_comdat_info *bfd_coff_get_comdat_section + (bfd *, struct bfd_section *);