diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-07-01 23:20:08 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 1999-07-01 23:20:08 +0000 |
commit | 23bc299bd87439c2bc1c2a7969b427b06831bfed (patch) | |
tree | 833448563442d4678dfc243fd94ac2a4b9567aa6 /bfd/elf-bfd.h | |
parent | b1c5e0ee59631e37ca448958be4d3aa8dc34aec1 (diff) | |
download | gdb-23bc299bd87439c2bc1c2a7969b427b06831bfed.zip gdb-23bc299bd87439c2bc1c2a7969b427b06831bfed.tar.gz gdb-23bc299bd87439c2bc1c2a7969b427b06831bfed.tar.bz2 |
* elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
fields.
(_bfd_elf_init_reloc_shdr): New function.
* elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
bfd_alloc followed by memset.
(_bfd_elf_init_reloc_shdr): New function, split out from ...
(elf_fake_sections): Here.
(assign_section_numbers): Assign section numbers for the second
relocation section, if required.
* elflink.h (elf_link_output_relocs): New function.
(elf_link_size_reloc_section): Likewise.
(elf_bfd_final_link): Use elf_link_size_reloc_section.
(elf_link_input_bfd): Use elf_link_output_relocs.
* elf32-mips.c (_bfd_mips_elf_fake_sections): Use
_bfd_elf_init_reloc_shdr to initialize rel_hdr2.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 346daab..05667bd 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -574,12 +574,19 @@ struct bfd_elf_section_data /* If there is a second reloc section associated with this section, as can happen on Irix 6, this field points to the header. */ Elf_Internal_Shdr *rel_hdr2; + /* The number of relocations currently assigned to REL_HDR. */ + unsigned int rel_count; + /* The number of relocations currently assigned to REL_HDR2. */ + unsigned int rel_count2; /* The ELF section number of this section. Only used for an output file. */ int this_idx; - /* The ELF section number of the reloc section associated with this - section, if any. Only used for an output file. */ + /* The ELF section number of the reloc section indicated by + REL_HDR if any. Only used for an output file. */ int rel_idx; + /* The ELF section number of the reloc section indicated by + REL_HDR2 if any. Only used for an output file. */ + int rel_idx2; /* Used by the backend linker to store the symbol hash table entries associated with relocs against global symbols. */ struct elf_link_hash_entry **rel_hashes; @@ -897,6 +904,8 @@ extern boolean _bfd_elf_find_nearest_line PARAMS ((bfd *, asection *, #define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol extern int _bfd_elf_sizeof_headers PARAMS ((bfd *, boolean)); extern boolean _bfd_elf_new_section_hook PARAMS ((bfd *, asection *)); +extern boolean _bfd_elf_init_reloc_shdr + PARAMS ((bfd *, Elf_Internal_Shdr *, asection *, boolean)); /* If the target doesn't have reloc handling written yet: */ extern void _bfd_elf_no_info_to_howto PARAMS ((bfd *, arelent *, |