This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: trunk gold not building unoptimized, powerpc.cc refs to invalid_address and pltresolve_size
On Fri, Dec 07, 2012 at 10:59:36AM +1030, Alan Modra wrote:
> On Thu, Dec 06, 2012 at 03:45:22PM -0800, Ian Lance Taylor wrote:
> > Alan needs to add a definition for the constant. In C++98, all
> > constants declared in classes, even those declared in template
> > classes, require an explicit definition.
> >
> > template<int size, bool big_endian>
> > const Address Target_powerpc::invalid_address;
This makes the link error go away, but I don't really understand why
this is necessary.. OK to apply?
* powerpc.cc (Stub_table::do_write): Delete redundant Address
typedef and invalid_address constant.
(class Output_data_glink, class Stub_table): Explicitly instantiate.
Index: gold/powerpc.cc
===================================================================
RCS file: /cvs/src/src/gold/powerpc.cc,v
retrieving revision 1.75
diff -u -p -r1.75 powerpc.cc
--- gold/powerpc.cc 7 Dec 2012 00:03:18 -0000 1.75
+++ gold/powerpc.cc 7 Dec 2012 01:21:14 -0000
@@ -3239,9 +3239,6 @@ Stub_table<size, big_endian>::do_write(O
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,31 @@ Target_selector_powerpc<32, false> targe
Target_selector_powerpc<64, true> target_selector_ppc64;
Target_selector_powerpc<64, false> target_selector_ppc64le;
+#ifdef HAVE_TARGET_32_LITTLE
+template
+class Output_data_glink<32, false>;
+template
+class Stub_table<32, false>;
+#endif
+
+#ifdef HAVE_TARGET_32_BIG
+template
+class Output_data_glink<32, true>;
+template
+class Stub_table<32, true>;
+#endif
+
+#ifdef HAVE_TARGET_64_LITTLE
+template
+class Output_data_glink<64, false>;
+template
+class Stub_table<64, false>;
+#endif
+
+#ifdef HAVE_TARGET_64_BIG
+template
+class Output_data_glink<64, true>;
+template
+class Stub_table<64, true>;
+#endif
} // End anonymous namespace.
--
Alan Modra
Australia Development Lab, IBM