http://sourceware.org/bugzilla/show_bug.cgi?id=14570

             Bug #: 14570
           Summary: Gold is broken for x32
           Product: binutils
           Version: 2.24 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: i...@airs.com
        ReportedBy: hjl.to...@gmail.com
                CC: ccout...@google.com
    Classification: Unclassified


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.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to