Add gdb for or1k build
[deliverable/binutils-gdb.git] / bfd / elfxx-x86.h
index a6a8455ba96498a8f41989937b6ee5a91aee4931..f4313aba48b7efe189ba142e1cfae05aa21a0bf1 100644 (file)
        && (EH) != NULL \
        && (EH)->elf.dynindx != -1 \
        && (!(EH)->elf.non_got_ref \
-          || (EH)->func_pointer_refcount > 0 \
           || ((EH)->elf.root.type == bfd_link_hash_undefweak \
               && !(RESOLVED_TO_ZERO))) \
               && (((EH)->elf.def_dynamic && !(EH)->elf.def_regular) \
@@ -268,10 +267,6 @@ struct elf_x86_link_hash_entry
      is only used by x86-64.  */
   unsigned int needs_copy : 1;
 
-  /* Reference count of C/C++ function pointer relocations in read-write
-     section which can be resolved at run-time.  */
-  bfd_signed_vma func_pointer_refcount;
-
   /* Information about the GOT PLT entry. Filled when there are both
      GOT and PLT relocations against the same function.  */
   union gotplt_union plt_got;
@@ -289,12 +284,12 @@ struct elf_x86_lazy_plt_layout
   /* The first entry in an absolute lazy procedure linkage table looks
      like this.  */
   const bfd_byte *plt0_entry;
-  unsigned int plt0_entry_size;          /* Size of PLT0 entry.  */
+  unsigned int plt0_entry_size;                 /* Size of PLT0 entry.  */
 
   /* Later entries in an absolute lazy procedure linkage table look
      like this.  */
   const bfd_byte *plt_entry;
-  unsigned int plt_entry_size;          /* Size of each PLT entry.  */
+  unsigned int plt_entry_size;         /* Size of each PLT entry.  */
 
   /* Offsets into plt0_entry that are to be replaced with GOT[1] and
      GOT[2].  */
@@ -343,7 +338,7 @@ struct elf_x86_non_lazy_plt_layout
   /* Entries in a PIC non-lazy procedure linkage table look like this.  */
   const bfd_byte *pic_plt_entry;
 
-  unsigned int plt_entry_size;          /* Size of each PLT entry.  */
+  unsigned int plt_entry_size;         /* Size of each PLT entry.  */
 
   /* Offsets into plt_entry that are to be replaced with...  */
   unsigned int plt_got_offset;    /* ... address of this symbol in .got. */
@@ -365,7 +360,7 @@ struct elf_x86_plt_layout
   const bfd_byte *plt0_entry;
   /* Entries in a procedure linkage table look like this.  */
   const bfd_byte *plt_entry;
-  unsigned int plt_entry_size;          /* Size of each PLT entry.  */
+  unsigned int plt_entry_size;         /* Size of each PLT entry.  */
 
   /* 1 has PLT0.  */
   unsigned int has_plt0;
@@ -403,6 +398,13 @@ struct elf_x86_plt_layout
 #define elf_x86_hash_entry(ent) \
   ((struct elf_x86_link_hash_entry *)(ent))
 
+enum elf_x86_target_os
+{
+  is_normal,
+  is_vxworks,
+  is_nacl
+};
+
 /* x86 ELF linker hash table.  */
 
 struct elf_x86_link_hash_table
@@ -458,10 +460,6 @@ struct elf_x86_link_hash_table
      to read-only sections.  */
   bfd_boolean readonly_dynrelocs_against_ifunc;
 
-  /* TRUE if this is a VxWorks x86 target.  This is only used for
-     i386.  */
-  bfd_boolean is_vxworks;
-
   /* The (unloaded but important) .rel.plt.unloaded section on VxWorks.
      This is used for i386 only.  */
   asection *srelplt2;
@@ -476,10 +474,15 @@ struct elf_x86_link_hash_table
      yet.  This is only used for x86-64.  */
   bfd_vma tlsdesc_plt;
 
+   /* Value used to fill the unused bytes of the first PLT entry.  This
+      is only used for i386.  */
+  bfd_byte plt0_pad_byte;
+
   bfd_vma (*r_info) (bfd_vma, bfd_vma);
   bfd_vma (*r_sym) (bfd_vma);
   bfd_boolean (*is_reloc_section) (const char *);
   enum elf_target_id target_id;
+  enum elf_x86_target_os target_os;
   unsigned int sizeof_reloc;
   unsigned int dt_reloc;
   unsigned int dt_reloc_sz;
@@ -491,6 +494,18 @@ struct elf_x86_link_hash_table
   const char *tls_get_addr;
 };
 
+/* Architecture-specific backend data for x86.  */
+
+struct elf_x86_backend_data
+{
+  /* Target system.  */
+  enum elf_x86_target_os target_os;
+};
+
+#define get_elf_x86_backend_data(abfd) \
+  ((const struct elf_x86_backend_data *) \
+   get_elf_backend_data (abfd)->arch_data)
+
 struct elf_x86_init_table
 {
   /* The lazy PLT layout.  */
@@ -505,11 +520,7 @@ struct elf_x86_init_table
   /* The non-lazy PLT layout for IBT.  */
   const struct elf_x86_non_lazy_plt_layout *non_lazy_ibt_plt;
 
-  /* TRUE if this is a normal x86 target.  */
-  bfd_boolean normal_target;
-
-  /* TRUE if this is a VxWorks x86 target.  */
-  bfd_boolean is_vxworks;
+  bfd_byte plt0_pad_byte;
 
   bfd_vma (*r_info) (bfd_vma, bfd_vma);
   bfd_vma (*r_sym) (bfd_vma);
This page took 0.03691 seconds and 4 git commands to generate.