This commit: http://sourceware.org/git/?p=binutils.git;a=commit;h=f1a44d332b9e891b517c6397f76d06dfd47abbdd has @@ -1409,19 +1414,24 @@ Output_data_got<size, big_endian>::Got_entry::write(unsigned char* pov) const default: { - const Relobj* object = this->u_.object; + const Sized_relobj_file<size, big_endian>* object + = static_cast<Sized_relobj_file<size, big_endian>*>(this->u_.object); const unsigned int lsi = this->local_sym_index_; But Output_data_got is declared as: template<int got_size, bool big_endian> class Output_data_got : public Output_data_got_base { public: typedef typename elfcpp::Elf_types<got_size>::Elf_Addr Valtype; The template size parameter is for GOT size, which is independent of the template size parameter for // A regular object file. This is size and endian specific. template<int size, bool big_endian> class Sized_relobj_file : public Sized_relobj<size, big_endian> { It is wrong to use GOT size a template parameter for Sized_relobj_file.
CVSROOT: /cvs/src Module name: src Changes by: ian@sourceware.org 2012-09-12 18:29:19 Modified files: gold : ChangeLog incremental.h object.h output.cc Log message: PR gold/14570 * output.cc: Rename Output_data_got template parameter from size to got_size for all functions. Compile all variants of Output_data_got. (Output_data_got::Got_entry::write): Correct use of size for symbol value. Use local_is_tls rather than casting to Sized_relobj_file. * object.h (class Object): Add local_is_tls and do_local_is_tls. (class Sized_relobj_file): Add do_local_is_tls. * incremental.h (class Sized_relobj_incr): Add do_local_is_tls. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.957&r2=1.958 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/incremental.h.diff?cvsroot=src&r1=1.32&r2=1.33 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/object.h.diff?cvsroot=src&r1=1.119&r2=1.120 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/output.cc.diff?cvsroot=src&r1=1.173&r2=1.174
Fixed.