diff options
author | Alan Modra <amodra@gmail.com> | 2014-08-29 10:52:50 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-08-29 10:52:50 +0930 |
commit | 4805fc5533c158766d04f58af62bea884d624421 (patch) | |
tree | f25310211864376e9884a77a53d1ed35e1d9231b | |
parent | b138affb0262cc600485a93d4fa8cfc7491dbde9 (diff) | |
download | gdb-4805fc5533c158766d04f58af62bea884d624421.zip gdb-4805fc5533c158766d04f58af62bea884d624421.tar.gz gdb-4805fc5533c158766d04f58af62bea884d624421.tar.bz2 |
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.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3c914be..fae94fd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 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 error. Remove redundant bfd_set_error. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 2b9b07e..123a33a 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; |