X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Flibbfd-in.h;h=52c1f5f88ca37213ba48f01c1e2fa94b74194c1e;hb=493443a47f514251f12e08223b2c56f0fed69015;hp=87a73b4623928829ea925fd1cd0b170a026ebe1e;hpb=09266d1a64b852169ea7d157854e57b554dadc5d;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index 87a73b4623..52c1f5f88c 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h @@ -3,7 +3,7 @@ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010 + 2010, 2011, 2012 Free Software Foundation, Inc. Written by Cygnus Support. @@ -64,16 +64,17 @@ struct section_hash_entry /* tdata for an archive. For an input archive, cache needs to be free()'d. For an output archive, symdefs do. */ -struct artdata { +struct artdata +{ file_ptr first_file_filepos; /* Speed up searching the armap */ htab_t cache; - bfd *archive_head; /* Only interesting in output routines */ - carsym *symdefs; /* the symdef entries */ - symindex symdef_count; /* how many there are */ - char *extended_names; /* clever intel extension */ - bfd_size_type extended_names_size; /* Size of extended names */ - /* when more compilers are standard C, this can be a time_t */ + bfd *archive_head; /* Only interesting in output routines. */ + carsym *symdefs; /* The symdef entries. */ + symindex symdef_count; /* How many there are. */ + char *extended_names; /* Clever intel extension. */ + bfd_size_type extended_names_size; /* Size of extended names. */ + /* When more compilers are standard C, this can be a time_t. */ long armap_timestamp; /* Timestamp value written into armap. This is used for BSD archives to check that the timestamp is recent enough @@ -88,12 +89,15 @@ struct artdata { #define bfd_ardata(bfd) ((bfd)->tdata.aout_ar_data) /* Goes in bfd's arelt_data slot */ -struct areltdata { - char * arch_header; /* it's actually a string */ - unsigned int parsed_size; /* octets of filesize not including ar_hdr */ - unsigned int extra_size; /* BSD4.4: extra bytes after the header. */ - char *filename; /* null-terminated */ - file_ptr origin; /* for element of a thin archive */ +struct areltdata +{ + char * arch_header; /* It's actually a string. */ + bfd_size_type parsed_size; /* Octets of filesize not including ar_hdr. */ + bfd_size_type extra_size; /* BSD4.4: extra bytes after the header. */ + char *filename; /* Null-terminated. */ + file_ptr origin; /* For element of a thin archive. */ + void *parent_cache; /* Where and how to find this member. */ + file_ptr key; }; #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size) @@ -115,13 +119,10 @@ extern void *bfd_zmalloc2 extern void _bfd_default_error_handler (const char *s, ...); extern bfd_error_handler_type _bfd_error_handler; +extern bfd_assert_handler_type _bfd_assert_handler; /* These routines allocate and free things on the BFD's objalloc. */ -extern void *bfd_alloc - (bfd *, bfd_size_type); -extern void *bfd_zalloc - (bfd *, bfd_size_type); extern void *bfd_alloc2 (bfd *, bfd_size_type, bfd_size_type); extern void *bfd_zalloc2 @@ -161,8 +162,6 @@ extern bfd *_bfd_generic_get_elt_at_index (bfd *, symindex); bfd * _bfd_new_bfd (void); -void _bfd_delete_bfd - (bfd *); bfd_boolean _bfd_free_cached_info (bfd *); @@ -207,6 +206,8 @@ extern void *_bfd_generic_read_ar_hdr (bfd *); extern void _bfd_ar_spacepad (char *, size_t, const char *, long); +extern bfd_boolean _bfd_ar_sizepad + (char *, size_t, bfd_size_type); extern void *_bfd_generic_read_ar_hdr_mag (bfd *, const char *); @@ -231,7 +232,9 @@ int bfd_generic_stat_arch_elt /* Generic routines to use for BFD_JUMP_TABLE_GENERIC. Use BFD_JUMP_TABLE_GENERIC (_bfd_generic). */ -#define _bfd_generic_close_and_cleanup bfd_true +#define _bfd_generic_close_and_cleanup _bfd_archive_close_and_cleanup +extern bfd_boolean _bfd_archive_close_and_cleanup + (bfd *); #define _bfd_generic_bfd_free_cached_info bfd_true extern bfd_boolean _bfd_generic_new_section_hook (bfd *, asection *); @@ -270,6 +273,8 @@ extern int _bfd_nocore_core_file_failing_signal (bfd *); extern bfd_boolean _bfd_nocore_core_file_matches_executable_p (bfd *, bfd *); +extern int _bfd_nocore_core_file_pid + (bfd *); /* Routines to use for BFD_JUMP_TABLE_ARCHIVE when there is no archive file support. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive). */ @@ -455,6 +460,9 @@ extern bfd_boolean _bfd_generic_set_section_contents #define _bfd_nolink_bfd_gc_sections \ ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \ bfd_false) +#define _bfd_nolink_bfd_lookup_section_flags \ + ((bfd_boolean (*) (struct bfd_link_info *, struct flag_info *, asection *)) \ + bfd_0) #define _bfd_nolink_bfd_merge_sections \ ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \ bfd_false) @@ -480,7 +488,8 @@ extern bfd_boolean _bfd_generic_set_section_contents #define _bfd_nolink_bfd_link_split_section \ ((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false) #define _bfd_nolink_section_already_linked \ - ((void (*) (bfd *, struct bfd_section *, struct bfd_link_info *)) bfd_void) + ((bfd_boolean (*) (bfd *, asection *, \ + struct bfd_link_info *)) bfd_false) #define _bfd_nolink_bfd_define_common_symbol \ ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \ struct bfd_link_hash_entry *)) bfd_false) @@ -519,23 +528,47 @@ extern bfd_boolean _bfd_dwarf1_find_nearest_line (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, unsigned int *); +struct dwarf_debug_section +{ + const char *uncompressed_name; + const char *compressed_name; +}; + +/* Map of uncompressed DWARF debug section name to compressed one. It + is terminated by NULL uncompressed_name. */ + +extern const struct dwarf_debug_section dwarf_debug_sections[]; + /* Find the nearest line using DWARF 2 debugging information. */ extern bfd_boolean _bfd_dwarf2_find_nearest_line - (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, - unsigned int *, unsigned int, void **); + (bfd *, const struct dwarf_debug_section *, asection *, asymbol **, bfd_vma, + const char **, const char **, unsigned int *, unsigned int *, unsigned int, + void **); /* Find the line using DWARF 2 debugging information. */ extern bfd_boolean _bfd_dwarf2_find_line (bfd *, asymbol **, asymbol *, const char **, - unsigned int *, unsigned int, void **); + unsigned int *, unsigned int *, unsigned int, void **); bfd_boolean _bfd_generic_find_line (bfd *, asymbol **, asymbol *, const char **, unsigned int *); +bfd_boolean _bfd_generic_find_nearest_line_discriminator + (bfd *, asection *, asymbol **, bfd_vma, const char **, const char **, + unsigned int *, unsigned int *); + /* Find inliner info after calling bfd_find_nearest_line. */ extern bfd_boolean _bfd_dwarf2_find_inliner_info (bfd *, const char **, const char **, unsigned int *, void **); - + +/* Read DWARF 2 debugging information. */ +extern bfd_boolean _bfd_dwarf2_slurp_debug_info + (bfd *, bfd *, const struct dwarf_debug_section *, asymbol **, void **); + +/* Clean up the data used to handle DWARF 2 debugging information. */ +extern void _bfd_dwarf2_cleanup_debug_info + (bfd *, void **); + /* Create a new section entry. */ extern struct bfd_hash_entry *bfd_section_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); @@ -600,8 +633,8 @@ extern bfd_boolean _bfd_generic_final_link extern bfd_boolean _bfd_generic_link_split_section (bfd *, struct bfd_section *); -extern void _bfd_generic_section_already_linked - (bfd *, struct bfd_section *, struct bfd_link_info *); +extern bfd_boolean _bfd_generic_section_already_linked + (bfd *, asection *, struct bfd_link_info *); /* Generic reloc_link_order processing routine. */ extern bfd_boolean _bfd_generic_reloc_link_order @@ -626,7 +659,7 @@ extern bfd_reloc_status_type _bfd_relocate_contents /* Clear a given location using a given howto. */ extern void _bfd_clear_contents (reloc_howto_type *howto, bfd *input_bfd, - bfd_byte *location); + asection *input_section, bfd_byte *location); /* Link stabs in sections in the first pass. */ @@ -674,6 +707,10 @@ extern bfd_boolean _bfd_write_merged_section extern bfd_vma _bfd_merged_section_offset (bfd *, asection **, void *, bfd_vma); +/* Tidy up when done. */ + +extern void _bfd_merge_sections_free (void *); + /* Create a string table. */ extern struct bfd_strtab_hash *_bfd_stringtab_init (void); @@ -809,4 +846,3 @@ extern void bfd_section_already_linked_table_traverse extern bfd_vma read_unsigned_leb128 (bfd *, bfd_byte *, unsigned int *); extern bfd_signed_vma read_signed_leb128 (bfd *, bfd_byte *, unsigned int *); -