diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-07-17 01:15:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-07-17 01:15:42 +0000 |
commit | ea61717495bad0a5fe182954bbb1c8a80890a98a (patch) | |
tree | 69232719f0957741d2893d9ae0aa49c2e614386b /bfd/libelf.h | |
parent | 62a5dabced9c5369448d52c847cb96a388d76e1e (diff) | |
download | gdb-ea61717495bad0a5fe182954bbb1c8a80890a98a.zip gdb-ea61717495bad0a5fe182954bbb1c8a80890a98a.tar.gz gdb-ea61717495bad0a5fe182954bbb1c8a80890a98a.tar.bz2 |
* libelf.h (struct bfd_elf_section_data): Add relocs field.
(shdr_name): Remove; unused.
* elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL
and RELA relocs. Free up the unswapped relocs. Permit the relocs
to be cached in the section_data. Correct the reloc address.
(elf_slurp_reloca_table): Remove.
(elf_canonicalize_reloc): Rewrote.
(elf_link_input_bfd): Permit the relocs to be cached in the
section data.
Diffstat (limited to 'bfd/libelf.h')
-rw-r--r-- | bfd/libelf.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/bfd/libelf.h b/bfd/libelf.h index 748e482..84f79bb 100644 --- a/bfd/libelf.h +++ b/bfd/libelf.h @@ -375,14 +375,29 @@ struct elf_sym_extra typedef struct elf_sym_extra Elf_Sym_Extra; +/* Information stored for each BFD section in an ELF file. This + structure is allocated by elf_new_section_hook. */ + struct bfd_elf_section_data { + /* The ELF header for this section. */ Elf_Internal_Shdr this_hdr; + /* The ELF header for the reloc section associated with this + section, if any. */ Elf_Internal_Shdr rel_hdr; - int this_idx, rel_idx; + /* 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. */ + int rel_idx; + /* 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; + /* A pointer to the unswapped external relocs; this may be NULL. */ + PTR relocs; }; + #define elf_section_data(sec) ((struct bfd_elf_section_data*)sec->used_by_bfd) -#define shdr_name(abfd,shdr) (elf_shstrtab (abfd)->tab + (shdr)->sh_name) #define get_elf_backend_data(abfd) \ ((struct elf_backend_data *) (abfd)->xvec->backend_data) |