aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-12-07 04:23:36 +0000
committerAlan Modra <amodra@gmail.com>2012-12-07 04:23:36 +0000
commitdecdd3bc369ed3d5fdc9dc1d0fcf9b0b21cfceef (patch)
tree1778a22c7708d9c47a50d9b3d87eb29d55274f9b /gold
parentae2b630d4ef1d87632371c0fc75e3cbb7caf4750 (diff)
downloadbinutils-decdd3bc369ed3d5fdc9dc1d0fcf9b0b21cfceef.zip
binutils-decdd3bc369ed3d5fdc9dc1d0fcf9b0b21cfceef.tar.gz
binutils-decdd3bc369ed3d5fdc9dc1d0fcf9b0b21cfceef.tar.bz2
* powerpc.cc (Stub_table::do_write): Delete redundant Address
typedef and invalid_address constant. (Output_data_glink, Stub_table, Target_powerpc): Explicitly instantiate constants.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog7
-rw-r--r--gold/powerpc.cc13
2 files changed, 17 insertions, 3 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 25898c5..1067019 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,12 @@
2012-12-07 Alan Modra <amodra@gmail.com>
+ * powerpc.cc (Stub_table::do_write): Delete redundant Address
+ typedef and invalid_address constant.
+ (Output_data_glink, Stub_table, Target_powerpc): Explicitly
+ instantiate constants.
+
+2012-12-07 Alan Modra <amodra@gmail.com>
+
* options.h (General_options): Add no_toc_optimize.
* powerpc.cc (ok_lo_toc_insn): New function.
(Target_powerpc::Relocate::relocate): Optimize toc access sequences.
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 7fa68d7..3d54577 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -3239,9 +3239,6 @@ Stub_table<size, big_endian>::do_write(Output_file* of)
unsigned char* const oview = of->get_output_view(off, oview_size);
unsigned char* p;
- typedef typename elfcpp::Elf_types<size>::Elf_Addr Address;
- static const Address invalid_address = static_cast<Address>(0) - 1;
-
if (size == 64)
{
const Output_data_got_powerpc<size, big_endian>* got
@@ -6984,4 +6981,14 @@ Target_selector_powerpc<32, false> target_selector_ppc32le;
Target_selector_powerpc<64, true> target_selector_ppc64;
Target_selector_powerpc<64, false> target_selector_ppc64le;
+// Instantiate these constants for -O0
+template<int size, bool big_endian>
+const int Output_data_glink<size, big_endian>::pltresolve_size;
+template<int size, bool big_endian>
+const typename Stub_table<size, big_endian>::Address
+ Stub_table<size, big_endian>::invalid_address;
+template<int size, bool big_endian>
+const typename Target_powerpc<size, big_endian>::Address
+ Target_powerpc<size, big_endian>::invalid_address;
+
} // End anonymous namespace.