aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-09-29 06:21:59 +0000
committerAlan Modra <amodra@gmail.com>2001-09-29 06:21:59 +0000
commit51b64d56a7c65e6a30649cf9aade57b56c321c0e (patch)
tree92f1f675368a87f2f181589c5df4a599575e54fb /bfd/elf-bfd.h
parent21d17a588f70a57acf7d97def74a550e2925600e (diff)
downloadgdb-51b64d56a7c65e6a30649cf9aade57b56c321c0e.zip
gdb-51b64d56a7c65e6a30649cf9aade57b56c321c0e.tar.gz
gdb-51b64d56a7c65e6a30649cf9aade57b56c321c0e.tar.bz2
* elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
(struct elf_backend_data): Add can_refcount. * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set got.refcount and plt.refcount from init_refcount. (_bfd_elf_link_hash_table_init): Set up init_refcount. (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount rather than got/plt.offset, and test for <= 0 rather than -1. * elflink.h (size_dynamic_sections): Set init_refcount to -1. * elfxx-target.h (elf_backend_can_refcount): Define. (elfNN_bed): Init can_refcount. * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts. (_bfd_generic_link_hash_newfunc): Likewise. * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts starting from zero. (elf32_hppa_copy_indirect_symbol): Make static to agree with prototype. (elf_backend_can_refcount): Define. * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts starting from zero. (allocate_dynrelocs): Set plt/got.offset rather than *.refcount. (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment. (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars. (elf_backend_can_refcount): Define. (elf_i386_copy_indirect_symbol): Make static to agree with prototype. Formatting fix. * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define. * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts starting from zero. (elf_backend_can_refcount): Define.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 6f0ae0f..e1f38b9 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
/* The number of entries in a section is its size divided by the size
- of a single entry. This is normally only applicaable to reloc and
+ of a single entry. This is normally only applicable to reloc and
symbol table sections. */
#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize)
@@ -223,33 +223,50 @@ struct elf_link_local_dynamic_entry
struct elf_link_hash_table
{
struct bfd_link_hash_table root;
+
/* Whether we have created the special dynamic sections required
when linking against or generating a shared object. */
boolean dynamic_sections_created;
+
/* The BFD used to hold special sections created by the linker.
This will be the first BFD found which requires these sections to
be created. */
bfd *dynobj;
+
+ /* The value to use when initialising got.refcount/offset and
+ plt.refcount/offset in an elf_link_hash_entry. Set to zero when
+ the values are refcounts. Set to -1 in size_dynamic_sections
+ when the values may be offsets. */
+ bfd_signed_vma init_refcount;
+
/* The number of symbols found in the link which must be put into
the .dynsym section. */
bfd_size_type dynsymcount;
+
/* The string table of dynamic symbols, which becomes the .dynstr
section. */
struct bfd_strtab_hash *dynstr;
+
/* The number of buckets in the hash table in the .hash section.
This is based on the number of dynamic symbols. */
bfd_size_type bucketcount;
+
/* A linked list of DT_NEEDED names found in dynamic objects
included in the link. */
struct bfd_link_needed_list *needed;
+
/* The _GLOBAL_OFFSET_TABLE_ symbol. */
struct elf_link_hash_entry *hgot;
+
/* A pointer to information used to link stabs in sections. */
PTR stab_info;
+
/* A pointer to information used to merge SEC_MERGE sections. */
PTR merge_info;
+
/* A linked list of local symbols to be added to .dynsym. */
struct elf_link_local_dynamic_entry *dynlocal;
+
/* A linked list of DT_RPATH/DT_RUNPATH names found in dynamic
objects included in the link. */
struct bfd_link_needed_list *runpath;
@@ -726,6 +743,7 @@ struct elf_backend_data
unsigned plt_not_loaded : 1;
unsigned plt_alignment : 4;
unsigned can_gc_sections : 1;
+ unsigned can_refcount : 1;
unsigned want_got_sym : 1;
unsigned want_dynbss : 1;
};