bfd_vma target;
enum elf32_arm_stub_type stub_type = arm_stub_none;
struct a8_erratum_reloc key, *found;
+ bfd_boolean use_plt = FALSE;
key.from = base_vma + i;
found = (struct a8_erratum_reloc *)
{
char *error_message = NULL;
struct elf_link_hash_entry *entry;
- bfd_boolean use_plt = FALSE;
/* We don't care about the error returned from this
function, only if there is glue or not. */
offset =
(bfd_signed_vma) (found->destination - pc_for_insn);
+ /* If the stub will use a Thumb-mode branch to a
+ PLT target, redirect it to the preceding Thumb
+ entry point. */
+ if (stub_type != arm_stub_a8_veneer_blx && use_plt)
+ offset -= PLT_THUMB_STUB_SIZE;
+
target = pc_for_insn + offset;
/* The BLX stub is ARM-mode code. Adjust the offset to
struct elf_dyn_relocs *p;
if (h != NULL)
- pp = &((struct elf32_arm_link_hash_entry *) h)->dyn_relocs;
+ pp = &(eh->dyn_relocs);
else
{
Elf_Internal_Sym *isym;
if (pp == NULL)
return FALSE;
}
- for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ for (; (p = *pp) != NULL; pp = &p->next)
if (p->sec == sec)
{
/* Everything must go for SEC. */
flagword *flagsp, asection **secp, bfd_vma *valp)
{
if ((abfd->flags & DYNAMIC) == 0
- && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
- elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE;
+ && (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
+ || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE))
+ elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
if (elf32_arm_hash_table (info)->vxworks_p
&& !elf_vxworks_add_symbol_hook (abfd, info, sym, namep,