From: Alan Modra Date: Fri, 29 Aug 2014 01:22:50 +0000 (+0930) Subject: PowerPC64 call lacks nop error X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4805fc5533c158766d04f58af62bea884d624421;p=binutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3c914be279c..fae94fd00a5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-08-29 Alan Modra + + * 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 * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 2b9b07ecf6d..123a33a0dae 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -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;