sections. Allow them to proceed, but warn that this might
break at runtime. */
info->callbacks->einfo
- (_("%P: copy reloc against `%s' requires lazy plt linking; "
+ (_("%P: copy reloc against `%T' requires lazy plt linking; "
"avoid setting LD_BIND_NOW=1 or upgrade gcc\n"),
h->root.root.string);
}
if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
ppc_howto_init ();
info->callbacks->einfo
- (_("%P: %H: %s relocation references "
+ (_("%P: %H: %s references "
"optimized away TOC entry\n"),
ibfd, sec, rel->r_offset,
ppc64_elf_howto_table[r_type]->name);
if (strcmp (opd->name, ".opd") != 0
|| opd->reloc_count != 0)
{
- info->callbacks->einfo (_("%P: cannot find opd entry toc for %s\n"),
+ info->callbacks->einfo (_("%P: cannot find opd entry toc for `%T'\n"),
stub_entry->h->elf.root.root.string);
bfd_set_error (bfd_error_bad_value);
return 0;
if (off + (1 << 25) >= (bfd_vma) (1 << 26))
{
- info->callbacks->einfo (_("%P: long branch stub `%s' offset overflow\n"),
- stub_entry->root.string);
+ info->callbacks->einfo
+ (_("%P: long branch stub `%s' offset overflow\n"),
+ stub_entry->root.string);
htab->stub_error = TRUE;
return FALSE;
}
if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
info->callbacks->einfo
- (_("%P: linkage table error against `%s'\n"),
+ (_("%P: linkage table error against `%T'\n"),
stub_entry->root.string);
bfd_set_error (bfd_error_bad_value);
htab->stub_error = TRUE;
if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
{
info->callbacks->einfo
- (_("%P: linkage table error against `%s'\n"),
+ (_("%P: linkage table error against `%T'\n"),
stub_entry->h != NULL
? stub_entry->h->elf.root.root.string
: "<local sym>");
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_boolean warned;
+ enum { DEST_NORMAL, DEST_OPD, DEST_STUB } reloc_dest;
unsigned int insn;
unsigned int mask;
struct ppc_stub_hash_entry *stub_entry;
else
info->callbacks->einfo
(!IS_PPC64_TLS_RELOC (r_type)
- ? _("%P: %H: %s used with TLS symbol %s\n")
- : _("%P: %H: %s used with non-TLS symbol %s\n"),
+ ? _("%P: %H: %s used with TLS symbol `%T'\n")
+ : _("%P: %H: %s used with non-TLS symbol `%T'\n"),
input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
insn = 0;
max_br_offset = 1 << 25;
addend = rel->r_addend;
+ reloc_dest = DEST_NORMAL;
switch (r_type)
{
default:
}
else
{
- if (strcmp (input_section->output_section->name,
- ".init") == 0
- || strcmp (input_section->output_section->name,
- ".fini") == 0)
- info->callbacks->einfo
- (_("%P: %H: automatic multiple TOCs "
- "not supported using your crt files; "
- "recompile with -mminimal-toc or upgrade gcc\n"),
- input_bfd, input_section, rel->r_offset);
- else
- info->callbacks->einfo
- (_("%P: %H: sibling call optimization to `%s' "
- "does not allow automatic multiple TOCs; "
- "recompile with -mminimal-toc or "
- "-fno-optimize-sibling-calls, "
- "or make `%s' extern\n"),
- input_bfd, input_section, rel->r_offset,
- sym_name,
- sym_name);
+ info->callbacks->einfo
+ (_("%P: %H: call to `%T' lacks nop, can't restore toc; "
+ "recompile with -fPIC"),
+ input_bfd, input_section, rel->r_offset, sym_name);
+
bfd_set_error (bfd_error_bad_value);
ret = FALSE;
}
{
relocation = dest;
addend = 0;
+ reloc_dest = DEST_OPD;
}
}
+ stub_entry->stub_sec->output_offset
+ stub_entry->stub_sec->output_section->vma);
addend = 0;
+ reloc_dest = DEST_STUB;
if ((stub_entry->stub_type == ppc_stub_plt_call
|| stub_entry->stub_type == ppc_stub_plt_call_r2save)
{
default:
info->callbacks->einfo
- (_("%P: %B: unknown relocation type %d for symbol %s\n"),
+ (_("%P: %B: unknown relocation type %d for `%T'\n"),
input_bfd, (int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
: ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)
{
info->callbacks->einfo
- (_("%P: %H: relocation %s for indirect "
- "function %s unsupported\n"),
+ (_("%P: %H: %s for indirect "
+ "function `%T' unsupported\n"),
input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[r_type]->name,
sym_name);
/* These ones haven't been implemented yet. */
info->callbacks->einfo
- (_("%P: %B: relocation %s is not supported for symbol %s\n"),
+ (_("%P: %B: %s is not supported for `%T'\n"),
input_bfd,
ppc64_elf_howto_table[r_type]->name, sym_name);
rel->r_offset) != (bfd_vma) -1)
{
info->callbacks->einfo
- (_("%P: %H: unresolvable %s relocation against symbol `%s'\n"),
+ (_("%P: %H: unresolvable %s against `%T'\n"),
input_bfd, input_section, rel->r_offset,
ppc64_elf_howto_table[(int) r_type]->name,
h->elf.root.root.string);
if (r != bfd_reloc_ok)
{
- if (sym_name == NULL)
- sym_name = "(null)";
+ char *more_info = NULL;
+ const char *reloc_name = ppc64_elf_howto_table[r_type]->name;
+
+ if (reloc_dest != DEST_NORMAL)
+ {
+ more_info = bfd_malloc (strlen (reloc_name) + 8);
+ if (more_info != NULL)
+ {
+ strcpy (more_info, reloc_name);
+ strcat (more_info, (reloc_dest == DEST_OPD
+ ? " (OPD)" : " (stub)"));
+ reloc_name = more_info;
+ }
+ }
+
if (r == bfd_reloc_overflow)
{
if (warned)
}
if (!((*info->callbacks->reloc_overflow)
- (info, (h ? &h->elf.root : NULL), sym_name,
- ppc64_elf_howto_table[r_type]->name,
- orig_rel.r_addend, input_bfd, input_section,
- rel->r_offset)))
+ (info, &h->elf.root, sym_name,
+ reloc_name, orig_rel.r_addend,
+ input_bfd, input_section, rel->r_offset)))
return FALSE;
}
else
{
info->callbacks->einfo
- (_("%P: %H: %s reloc against `%s': error %d\n"),
+ (_("%P: %H: %s against `%T': error %d\n"),
input_bfd, input_section, rel->r_offset,
- ppc64_elf_howto_table[r_type]->name,
- sym_name,
- (int) r);
+ reloc_name, sym_name, (int) r);
ret = FALSE;
}
+ if (more_info != NULL)
+ free (more_info);
}
}