This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v4] gold: Fix non-deterministic behaviour of Mips gold.
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Markus Trippelsdorf <markus at trippelsdorf dot de>
- Cc: Artemiy Volkov <artemiyv at acm dot org>, Vladimir Radosavljevic <Vladimir dot Radosavljevic at imgtec dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Petar Jovanovic <Petar dot Jovanovic at imgtec dot com>
- Date: Thu, 9 Jun 2016 11:43:40 -0700
- Subject: Re: [PATCH v4] gold: Fix non-deterministic behaviour of Mips gold.
- Authentication-results: sourceware.org; auth=none
- References: <3060420525346945A0ADBD567348A91723740FFD at BADAG02 dot ba dot imgtec dot org> <CAJimCsE0OMHB_TpscfbnGrYTiGXSPd+KoOLxQ6_bDzaSv5DXbA at mail dot gmail dot com> <CAOxjHa0aY2uFKCL-UPdQtQzkax_Y1F52k6WikCRta1nFi-O8KA at mail dot gmail dot com> <20160525134909 dot GA312 at x4>
>> this patch breaks the gold build for me since not all callers of
>> Mips_got_info::global_got_symbols() were adjusted to use the new
>> return type.
>>
>> I have attached the easiest possible fix.
>
> I ran into the same issue today.
> Please just commit your fix, because I think the patch is obvious.
I've committed the patch, but I used a typedef to improve the formatting.
Thanks, Artemiy!
-cary
2016-06-09 Artemiy Volkov <artemiyv@acm.org>
gold/
* mips.cc (Mips_output_data_got::do_write): Add missing template
args via typedef.
diff --git a/gold/mips.cc b/gold/mips.cc
index b8c74d0..e8a639b 100644
--- a/gold/mips.cc
+++ b/gold/mips.cc
@@ -6130,6 +6130,9 @@ template<int size, bool big_endian>
void
Mips_output_data_got<size, big_endian>::do_write(Output_file* of)
{
+ typedef Unordered_set<Mips_symbol<size>*, Mips_symbol_hash<size> >
+ Mips_stubs_entry_set;
+
// Call parent to write out GOT.
Output_data_got<size, big_endian>::do_write(of);
@@ -6142,7 +6145,7 @@ Mips_output_data_got<size,
big_endian>::do_write(Output_file* of)
this->got_view_ = oview;
// Write lazy stub addresses.
- for (typename Unordered_set<Mips_symbol<size>*>::iterator
+ for (typename Mips_stubs_entry_set::iterator
p = this->master_got_info_->global_got_symbols().begin();
p != this->master_got_info_->global_got_symbols().end();
++p)
@@ -6159,7 +6162,7 @@ Mips_output_data_got<size,
big_endian>::do_write(Output_file* of)
}
// Add +1 to GGA_NONE nonzero MIPS16 and microMIPS entries.
- for (typename Unordered_set<Mips_symbol<size>*>::iterator
+ for (typename Mips_stubs_entry_set::iterator
p = this->master_got_info_->global_got_symbols().begin();
p != this->master_got_info_->global_got_symbols().end();
++p)