This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);
       }
   }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]