PowerPC64 call lacks nop error

* elf64-ppc.c (ppc64_elf_relocate_section): Report a different
	error for calls via a toc adjusting stub without a nop.
This commit is contained in:
Alan Modra 2014-08-29 10:52:50 +09:30
parent b138affb02
commit 4805fc5533
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2014-08-29 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (ppc64_elf_relocate_section): Report a different
error for calls via a toc adjusting stub without a nop.
2014-08-29 Alan Modra <amodra@gmail.com>
* vms-alpha.c (alpha_vma_object_p): Don't return file_truncated

View File

@ -13761,10 +13761,17 @@ ppc64_elf_relocate_section (bfd *output_bfd,
if (!can_plt_call)
{
info->callbacks->einfo
(_("%P: %H: call to `%T' lacks nop, can't restore toc; "
"recompile with -fPIC\n"),
input_bfd, input_section, rel->r_offset, sym_name);
if (stub_entry->stub_type == ppc_stub_plt_call
|| stub_entry->stub_type == ppc_stub_plt_call_r2save)
info->callbacks->einfo
(_("%P: %H: call to `%T' lacks nop, can't restore toc; "
"recompile with -fPIC\n"),
input_bfd, input_section, rel->r_offset, sym_name);
else
info->callbacks->einfo
(_("%P: %H: call to `%T' lacks nop, can't restore toc; "
"(-mcmodel=small toc adjust stub)\n"),
input_bfd, input_section, rel->r_offset, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = FALSE;