This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold ppc patch] Fix BRLT for PPC-64
- From: Cary Coutant <ccoutant at google dot com>
- To: Binutils <binutils at sourceware dot org>, Alan Modra <amodra at gmail dot com>
- Date: Thu, 11 Jul 2013 14:31:40 -0700
- Subject: [gold ppc patch] Fix BRLT for PPC-64
When gold writes the BRLT for PPC-64, it writes the entries out as
32-bit values, resulting in SIGSEGV's at runtime. This patch fixes
that by using the proper sized write.
Tested and committed.
-cary
2013-07-11 Cary Coutant <ccoutant@google.com>
gold/
* powerpc.cc (Target_powerpc::write_branch_lookup_table): Use
correct BRLT entry size.
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 0653ea7..7d383f7 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -735,7 +735,7 @@ class Target_powerpc : public Sized_target<size, big_endian>
p != this->branch_lookup_table_.end();
++p)
{
- elfcpp::Swap<32, big_endian>::writeval(oview + p->second, p->first);
+ elfcpp::Swap<size, big_endian>::writeval(oview + p->second, p->first);
}
}