+2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
+ sizeof_reloc.
+ (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
+ * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
+
2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
{
ret->r_info = elf64_r_info;
ret->r_sym = elf64_r_sym;
+ ret->sizeof_reloc = sizeof (Elf64_External_Rela);
ret->pointer_r_type = R_X86_64_64;
ret->dynamic_interpreter = ELF64_DYNAMIC_INTERPRETER;
ret->dynamic_interpreter_size = sizeof ELF64_DYNAMIC_INTERPRETER;
ret->r_sym = elf32_r_sym;
if (bed->target_id == X86_64_ELF_DATA)
{
+ ret->sizeof_reloc = sizeof (Elf32_External_Rela);
ret->pointer_r_type = R_X86_64_32;
ret->dynamic_interpreter = ELFX32_DYNAMIC_INTERPRETER;
ret->dynamic_interpreter_size
}
else
{
+ ret->sizeof_reloc = sizeof (Elf32_External_Rel);
ret->pointer_r_type = R_386_32;
ret->dynamic_interpreter = ELF32_DYNAMIC_INTERPRETER;
ret->dynamic_interpreter_size
}
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
{
- srel->size += ((bed->target_id == I386_ELF_DATA)
- ? sizeof (Elf32_External_Rel)
- : bed->s->sizeof_rela);
+ srel->size += htab->sizeof_reloc;
h->needs_copy = 1;
}
bfd_vma (*r_info) (bfd_vma, bfd_vma);
bfd_vma (*r_sym) (bfd_vma);
+ unsigned int sizeof_reloc;
unsigned int pointer_r_type;
int dynamic_interpreter_size;
const char *dynamic_interpreter;