/* x86 specific support for ELF
- Copyright (C) 2017-2020 Free Software Foundation, Inc.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#define elf_x86_hash_entry(ent) \
((struct elf_x86_link_hash_entry *)(ent))
-enum elf_x86_target_os
-{
- is_normal,
- is_solaris,
- is_vxworks,
- is_nacl
-};
-
/* x86 ELF linker hash table. */
struct elf_x86_link_hash_table
/* The amount of space used by the jump slots in the GOT. */
bfd_vma sgotplt_jump_table_size;
- /* Small local sym cache. */
- struct sym_cache sym_cache;
-
/* _TLS_MODULE_BASE_ symbol. */
struct bfd_link_hash_entry *tls_module_base;
htab_t loc_hash_table;
void * loc_hash_memory;
- /* The offset into sgot of the GOT entry used by the PLT entry
- above. */
- bfd_vma tlsdesc_got;
-
/* The index of the next R_X86_64_JUMP_SLOT entry in .rela.plt. */
bfd_vma next_jump_slot_index;
/* The index of the next R_X86_64_IRELATIVE entry in .rela.plt. */
bfd_vma next_irelative_index;
- /* TRUE if there are dynamic relocs against IFUNC symbols that apply
- to read-only sections. */
- bfd_boolean readonly_dynrelocs_against_ifunc;
-
/* The (unloaded but important) .rel.plt.unloaded section on VxWorks.
This is used for i386 only. */
asection *srelplt2;
is only used for i386. */
bfd_vma next_tls_desc_index;
- /* The offset into splt of the PLT entry for the TLS descriptor
- resolver. Special values are 0, if not necessary (or not found
- to be necessary yet), and -1 if needed but not determined
- 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;
- unsigned int dt_reloc_ent;
unsigned int got_entry_size;
unsigned int pointer_r_type;
int dynamic_interpreter_size;
struct elf_linker_x86_params *params;
};
-/* 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. */
#define is_x86_elf(bfd, htab) \
(bfd_get_flavour (bfd) == bfd_target_elf_flavour \
&& elf_tdata (bfd) != NULL \
- && elf_object_id (bfd) == (htab)->target_id)
+ && elf_object_id (bfd) == (htab)->elf.hash_table_id)
extern bfd_boolean _bfd_x86_elf_mkobject
(bfd *);
(bfd *, struct bfd_link_info *);
extern void _bfd_x86_elf_merge_symbol_attribute
- (struct elf_link_hash_entry *, const Elf_Internal_Sym *,
- bfd_boolean, bfd_boolean);
+ (struct elf_link_hash_entry *, unsigned int, bfd_boolean, bfd_boolean);
extern void _bfd_x86_elf_copy_indirect_symbol
(struct bfd_link_info *, struct elf_link_hash_entry *,