&& (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) \
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;
/* 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]. */
/* 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. */
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;
#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
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;
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;
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. */
/* 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);