aboutsummaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-07-03 02:22:35 +0000
committerAlan Modra <amodra@gmail.com>2013-07-03 02:22:35 +0000
commitba8ca3e7399cd074297d850b5abd16a22bdf3eb2 (patch)
tree753a861c50d444c8a26f9ab2f6c554e432839d9e /gold/powerpc.cc
parentc66bb0eea0d2b6bc4b07f3457e2166fd0bbaba3c (diff)
downloadgdb-ba8ca3e7399cd074297d850b5abd16a22bdf3eb2.zip
gdb-ba8ca3e7399cd074297d850b5abd16a22bdf3eb2.tar.gz
gdb-ba8ca3e7399cd074297d850b5abd16a22bdf3eb2.tar.bz2
bfd/
* elf64-ppc.c (struct ppc_stub_hash_entry): Delete "addend". (ppc64_elf_size_stubs): Don't set "addend". (ppc64_elf_relocate_section): Don't allow calls via toc-adjusting stubs without a following nop even in an executable, except for self-calls and both libc_start_main and .libc_start_main. gold/ * powerpc.cc (Target_powerpc::Relocate::relocate): Update self-call comment.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 17849ee..0653ea7 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -6346,10 +6346,13 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
}
if (!can_plt_call)
{
- // This is not an error in one special case: A self
- // call. It isn't possible to cheaply verify we have
- // such a call so just check for a call to the same
- // section.
+ // g++ as of 20130507 emits self-calls without a
+ // following nop. This is arguably wrong since we have
+ // conflicting information. On the one hand a global
+ // symbol and on the other a local call sequence, but
+ // don't error for this special case.
+ // It isn't possible to cheaply verify we have exactly
+ // such a call. Allow all calls to the same section.
bool ok = false;
Address code = value;
if (gsym->source() == Symbol::FROM_OBJECT