diff mbox

[Bug15639,ARM] gold and -flto always fails with an internal error on arm-linux-gnueabi*

Message ID 52E8E59A.4040005@linaro.org
State New
Headers show

Commit Message

Kugan Vivekanandarajah Jan. 29, 2014, 11:27 a.m. UTC
Hi,

In Sized_relobj_file<size,
big_endian>::do_layout_deferred_sections(Layout* layout), while reading
.eh_frame, Arm_relobj<big_endian>::do_read_symbols(Read_symbols_data*
sd) is called second time around and this triggering the assert.

This patch removes the assert and skips reading if this section is
already read.

Is this OK?

Thanks,
Kugan


gold/
+2014-01-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
+
+	* arm.cc (Arm_relobj<big_endian>::do_read_symbols): Skip reading
+	.ARM.attributes section if already read.
+

Comments

Kugan Vivekanandarajah Feb. 18, 2014, 6:43 a.m. UTC | #1
On 29/01/14 22:27, Kugan wrote:
> Hi,
> 
> In Sized_relobj_file<size,
> big_endian>::do_layout_deferred_sections(Layout* layout), while reading
> .eh_frame, Arm_relobj<big_endian>::do_read_symbols(Read_symbols_data*
> sd) is called second time around and this triggering the assert.
> 
> This patch removes the assert and skips reading if this section is
> already read.
> 
> Is this OK?
> 
> Thanks,
> Kugan
> 
> 
> gold/
> +2014-01-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
> +
> +	* arm.cc (Arm_relobj<big_endian>::do_read_symbols): Skip reading
> +	.ARM.attributes section if already read.
> +
> 

ping ?

Thanks,
Kugan
Will Newton July 4, 2014, 2:44 p.m. UTC | #2
On 18 February 2014 06:43, Kugan <kugan.vivekanandarajah@linaro.org> wrote:
>
>
> On 29/01/14 22:27, Kugan wrote:
>> Hi,
>>
>> In Sized_relobj_file<size,
>> big_endian>::do_layout_deferred_sections(Layout* layout), while reading
>> .eh_frame, Arm_relobj<big_endian>::do_read_symbols(Read_symbols_data*
>> sd) is called second time around and this triggering the assert.
>>
>> This patch removes the assert and skips reading if this section is
>> already read.
>>
>> Is this OK?
>>
>> Thanks,
>> Kugan
>>
>>
>> gold/
>> +2014-01-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
>> +
>> +     * arm.cc (Arm_relobj<big_endian>::do_read_symbols): Skip reading
>> +     .ARM.attributes section if already read.
>> +
>>
>
> ping ?

Another ping for this old patch. Does anybody have any comments?

Thanks,
'Timothy Arceri' via Patchwork Forward July 4, 2014, 9:47 p.m. UTC | #3
Looks good to me.  I don't have approval power.  Cary, could you approval
this?

-Doug


On Wed, Jan 29, 2014 at 3:27 AM, Kugan <kugan.vivekanandarajah@linaro.org>
wrote:

> Hi,
>
> In Sized_relobj_file<size,
> big_endian>::do_layout_deferred_sections(Layout* layout), while reading
> .eh_frame, Arm_relobj<big_endian>::do_read_symbols(Read_symbols_data*
> sd) is called second time around and this triggering the assert.
>
> This patch removes the assert and skips reading if this section is
> already read.
>
> Is this OK?
>
> Thanks,
> Kugan
>
>
> gold/
> +2014-01-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
> +
> +       * arm.cc (Arm_relobj<big_endian>::do_read_symbols): Skip reading
> +       .ARM.attributes section if already read.
> +
>
diff mbox

Patch

diff --git a/gold/arm.cc b/gold/arm.cc
index 560f380..4588b94 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -6729,9 +6729,9 @@  Arm_relobj<big_endian>::do_read_symbols(Read_symbols_data* sd)
 	// be conservative.
 	must_merge_flags_and_attributes = true;
 
-      if (shdr.get_sh_type() == elfcpp::SHT_ARM_ATTRIBUTES)
+      if ((shdr.get_sh_type() == elfcpp::SHT_ARM_ATTRIBUTES)
+	  && (this->attributes_section_data_ == NULL))
 	{
-	  gold_assert(this->attributes_section_data_ == NULL);
 	  section_offset_type section_offset = shdr.get_sh_offset();
 	  section_size_type section_size =
 	    convert_to_section_size_type(shdr.get_sh_size());