summaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2013-07-03 02:22:35 +0000
committerAlan Modra <amodra@bigpond.net.au>2013-07-03 02:22:35 +0000
commitfb84d844ca4899ea4601e36e6e3d051d1f4ef43b (patch)
tree3e5e93bc6578aff1e42b395856cd36659aff8712 /gold
parent4034d2b4e4418477a769d78fd24a5ff05d9a2f17 (diff)
downloadbinutils-redhat-fb84d844ca4899ea4601e36e6e3d051d1f4ef43b.tar.gz
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')
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/powerpc.cc11
2 files changed, 12 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 3ca1cf7fee..33737151e0 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-03 Alan Modra <amodra@gmail.com>
+
+ * powerpc.cc (Target_powerpc::Relocate::relocate): Update self-call
+ comment.
+
2013-07-01 Cary Coutant <ccoutant@google.com>
* dwarf_reader.cc (Dwarf_ranges_table::read_ranges_table): Save
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 17849ee533..0653ea7167 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