static bfd_boolean
elf_i386_is_reloc_section (const char *secname)
{
- return CONST_STRNEQ (secname, ".rel");
+ return startswith (secname, ".rel");
}
static bfd_boolean
elf_x86_64_is_reloc_section (const char *secname)
{
- return CONST_STRNEQ (secname, ".rela");
+ return startswith (secname, ".rela");
}
/* Create an x86 ELF linker hash table. */
&& h->def_regular
&& h->dynindx != -1
&& h->plt.offset != (bfd_vma) -1
- && h->type == STT_GNU_IFUNC
- && h->pointer_equality_needed)
+ && h->type == STT_GNU_IFUNC)
{
asection *plt_s;
bfd_vma plt_offset;
}
}
+/* Report relative relocation. */
+
+void
+_bfd_x86_elf_link_report_relative_reloc
+ (struct bfd_link_info *info, asection *asect,
+ struct elf_link_hash_entry *h, Elf_Internal_Sym *sym,
+ const char *reloc_name, const void *reloc)
+{
+ const char *name;
+ bfd *abfd;
+ const Elf_Internal_Rela *rel = (const Elf_Internal_Rela *) reloc;
+ char r_offset[30], r_info[30];
+
+ /* Use the output BFD for linker created sections. */
+ if ((asect->flags & SEC_LINKER_CREATED) != 0)
+ abfd = info->output_bfd;
+ else
+ abfd = asect->owner;
+
+ if (h != NULL && h->root.root.string != NULL)
+ name = h->root.root.string;
+ else
+ name = bfd_elf_sym_name (abfd, &elf_symtab_hdr (abfd), sym, NULL);
+
+ bfd_sprintf_vma (abfd, r_offset, rel->r_offset);
+ bfd_sprintf_vma (abfd, r_info, rel->r_info);
+
+ if (asect->use_rela_p)
+ {
+ char r_addend[30];
+
+ bfd_sprintf_vma (abfd, r_addend, rel->r_addend);
+
+ info->callbacks->einfo
+ (_("%pB: %s (offset: 0x%s, info: 0x%s, addend: 0x%s) against "
+ "'%s' " "for section '%pA' in %pB\n"),
+ info->output_bfd, reloc_name, r_offset, r_info, r_addend,
+ name, asect, abfd);
+ }
+ else
+ info->callbacks->einfo
+ (_("%pB: %s (offset: 0x%s, info: 0x%s) against '%s' for section "
+ "'%pA' in %pB\n"),
+ info->output_bfd, reloc_name, r_offset, r_info, name,
+ asect, abfd);
+}
+
/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
bfd_boolean