X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=bfd%2Fbfd-in2.h;h=5001cf87b510eec32efb362c33344937d2898245;hb=e19f872c5bec6fbb9476abdc4ea5cee44da598e2;hp=ee194f986c6446923b6b3c18b1ad366922f2022c;hpb=6b6e92f432c86611c81a5da6880946bad25b59dc;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index ee194f986c..5001cf87b5 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -315,7 +315,8 @@ typedef struct bfd_section *sec_ptr; #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) @@ -440,6 +441,11 @@ 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); + #define COFF_SWAP_TABLE (void *) &bfd_coff_std_swap_table /* User program access to BFD facilities. */ @@ -512,6 +518,8 @@ 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 bfd_section **); @@ -1205,9 +1213,6 @@ typedef struct bfd_section /* See the vma field. */ unsigned int user_set_vma : 1; - /* Whether relocations have been processed. */ - unsigned int reloc_done : 1; - /* A mark flag used by some of the linker backends. */ unsigned int linker_mark : 1; @@ -1235,21 +1240,18 @@ typedef struct bfd_section unsigned int use_rela_p:1; /* Bits used by various backends. */ - unsigned int has_tls_reloc:1; - /* Nonzero if this section needs the relax finalize pass. */ - unsigned int need_finalize_relax:1; + /* Nonzero if this section has TLS related relocations. */ + unsigned int has_tls_reloc:1; /* Nonzero if this section has a gp reloc. */ unsigned int has_gp_reloc:1; - /* Unused bits. */ - unsigned int flag13:1; - unsigned int flag14:1; - unsigned int flag15:1; - unsigned int flag16:4; - unsigned int flag20:4; - unsigned int flag24:8; + /* Nonzero if this section needs the relax finalize pass. */ + unsigned int need_finalize_relax:1; + + /* Whether relocations have been processed. */ + unsigned int reloc_done : 1; /* End of internal packed boolean fields. */ @@ -1268,13 +1270,17 @@ typedef struct bfd_section /* The size of the section in octets, as it will be output. Contains a value even if the section has no contents (e.g., the - size of <<.bss>>). This will be filled in after relocation. */ - bfd_size_type _cooked_size; + size of <<.bss>>). */ + bfd_size_type size; - /* The original size on disk of the section, in octets. Normally this - value is the same as the size, but if some relaxing has - been done, then this value will be bigger. */ - bfd_size_type _raw_size; + /* The original size on disk of the section, in octets. This field + is used by the linker relaxation code. It is currently only set + for sections where the linker relaxation scheme doesn't cache + altered section and reloc contents (stabs, eh_frame, SEC_MERGE), + and thus the original size needs to be kept to read the section + multiple times. If non-zero, rawsize will be used in address + checks during relocation and to read section contents. */ + bfd_size_type rawsize; /* If this section is going to be output, then this value is the offset in *bytes* into the output section of the first byte in the @@ -1398,11 +1404,6 @@ extern const struct bfd_symbol * const bfd_abs_symbol; extern const struct bfd_symbol * const bfd_com_symbol; extern const struct bfd_symbol * const bfd_und_symbol; extern const struct bfd_symbol * const bfd_ind_symbol; -#define bfd_get_section_size_before_reloc(section) \ - ((section)->_raw_size) -#define bfd_get_section_size_after_reloc(section) \ - ((section)->reloc_done ? (section)->_cooked_size \ - : (abort (), (bfd_size_type) 1)) /* Macros to handle insertion and deletion of a bfd's sections. These only handle the list pointers, ie. do not adjust section_count, @@ -1472,6 +1473,9 @@ bfd_boolean bfd_get_section_contents (bfd *abfd, asection *section, void *location, file_ptr offset, bfd_size_type count); +bfd_boolean bfd_malloc_and_get_section + (bfd *abfd, asection *section, bfd_byte **buf); + bfd_boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); @@ -1650,6 +1654,7 @@ enum bfd_architecture #define bfd_mach_sh_dsp 0x2d #define bfd_mach_sh2e 0x2e #define bfd_mach_sh3 0x30 +#define bfd_mach_sh3_nommu 0x31 #define bfd_mach_sh3_dsp 0x3d #define bfd_mach_sh3e 0x3e #define bfd_mach_sh4 0x40 @@ -3945,6 +3950,11 @@ void bfd_set_gp_size (bfd *abfd, unsigned int i); bfd_vma bfd_scan_vma (const char *string, const char **end, int base); +bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); + +#define bfd_copy_private_header_data(ibfd, obfd) \ + BFD_SEND (obfd, _bfd_copy_private_header_data, \ + (ibfd, obfd)) bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ @@ -4225,6 +4235,7 @@ typedef struct bfd_target NAME##_bfd_merge_private_bfd_data, \ NAME##_bfd_copy_private_section_data, \ NAME##_bfd_copy_private_symbol_data, \ + NAME##_bfd_copy_private_header_data, \ NAME##_bfd_set_private_flags, \ NAME##_bfd_print_private_bfd_data @@ -4242,6 +4253,10 @@ typedef struct bfd_target to another. */ bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, asymbol *); + /* Called to copy BFD private header data from one object file + to another. */ + bfd_boolean (*_bfd_copy_private_header_data) + (bfd *, bfd *); /* Called to set private backend flags. */ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);