This is the mail archive of the 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]

Re: trunk gold not building unoptimized, 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?

	* (Stub_table::do_write): Delete redundant Address
	typedef and invalid_address constant.
	(class Output_data_glink, class Stub_table): Explicitly instantiate.

Index: gold/
RCS file: /cvs/src/src/gold/,v
retrieving revision 1.75
diff -u -p -r1.75
--- gold/	7 Dec 2012 00:03:18 -0000	1.75
+++ gold/	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;
+class Output_data_glink<32, false>;
+class Stub_table<32, false>;
+#ifdef HAVE_TARGET_32_BIG
+class Output_data_glink<32, true>;
+class Stub_table<32, true>;
+class Output_data_glink<64, false>;
+class Stub_table<64, false>;
+#ifdef HAVE_TARGET_64_BIG
+class Output_data_glink<64, true>;
+class Stub_table<64, true>;
 } // End anonymous namespace.

Alan Modra
Australia Development Lab, IBM

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