diff options
author | Alan Modra <amodra@gmail.com> | 2001-09-25 04:34:50 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-09-25 04:34:50 +0000 |
commit | 0c715baa724c70f3b8da8239e8c69bdaca8b05c9 (patch) | |
tree | bcbf60f47d938e3ac663b954c93efcb724074caa /bfd/elf-bfd.h | |
parent | 4f3379724d512db262eee1a6a8dc8938f11ee4a1 (diff) | |
download | gdb-0c715baa724c70f3b8da8239e8c69bdaca8b05c9.zip gdb-0c715baa724c70f3b8da8239e8c69bdaca8b05c9.tar.gz gdb-0c715baa724c70f3b8da8239e8c69bdaca8b05c9.tar.bz2 |
* elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
and "sreloc" fields.
* elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
"pc_count" fields. Remove "section" field.
(elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
allocate space for dynamic relocs here. Instead, record all
needed dynamic relocs via dyn_relocs and local_dynrel. Cache
pointer to "sreloc" section in elf_section_data.
(elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
(allocate_plt_and_got_and_discard_relocs): Rename to
allocate_dynrelocs. Allocate rather than discarding dyn relocs.
(readonly_dynrelocs): New function.
(elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
Rename "i" to "ibfd". Allocate space for local dyn relocs.
(elf_i386_relocate_section): Make use of cached sreloc.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index ec3b21d..6f0ae0f 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -737,43 +737,63 @@ 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; + /* 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 number of dynamic relocs copied for local symbols. */ + unsigned int local_dynrel; + + /* A pointer to the bfd section used for dynamic relocs. */ + asection *sreloc; + /* The ELF section number of this section. Only used for an output file. */ int this_idx; + /* 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; + /* A pointer to the swapped relocs. If the section uses REL relocs, rather than RELA, all the r_addend fields will be zero. This pointer may be NULL. It is used by the backend linker. */ Elf_Internal_Rela *relocs; + /* Used by the backend linker when generating a shared library to record the dynamic symbol index for a section symbol corresponding to this section. A value of 0 means that there is no dynamic symbol for this section. */ long dynindx; + /* A pointer used for .stab linking optimizations. */ PTR stab_info; + /* A pointer used for SEC_MERGE optimizations. */ PTR merge_info; + /* A pointer available for the processor specific ELF backend. */ PTR tdata; + /* Nonzero if this section uses RELA relocations, rather than REL. */ unsigned int use_rela_p:1; }; |