[PATCH] nios2: Don't disable relaxation with --gdwarf-N
Sandra Loosemore
sandra@codesourcery.com
Tue Jan 26 16:16:33 GMT 2021
On 1/26/21 5:51 AM, H.J. Lu wrote:
> On Mon, Jan 25, 2021 at 1:19 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> After
>>
>> commit 705989f19adf20dd70c50237ec61cd708f2b0939
>> Author: H.J. Lu <hjl.tools@gmail.com>
>> Date: Mon Jan 18 06:25:05 2021 -0800
>>
>> as: Automatically enable DWARF5 support
>>
>> --gdwarf-5 is no longer needed to accept DWARF5 info generated by GCC.
>>
>> Since assembler generated debug information is incompatible with
>> relaxation, don't generate debug information for assembly codes with
>> --gdwarf-5 which is passed down by GCC.
>>
>> OK for master and 2.36 branch?
>>
>> H.J.
>> ---
>> PR gas/27243
>> * config/tc-nios2.c (md_begin): Set debug_type to DEBUG_UNSPECIFIED
>> for --gdwarf-5.
>> * testsuite/gas/nios2/relax.d: New file.
>> * testsuite/gas/nios2/relax.s: Likewise.
>
> GCC 11 passes --gdwarf-5 to assembler to enable DWARF5 debug info. Don't
> disable relaxation when --gdwarf-N is specified. The assembler generated
> debug information will treat the sequence of the relaxed instructions as
> a single instruction.
>
> OK for master and 2.36 branch?
This is OK. I tested the same tweak overnight, gas and gcc test results
look reasonable with no Dwarf-related failures, and I also convinced
myself through manual inspection that the line number table is being
adjusted properly for the relaxation code sequences.
-Sandra
More information about the Binutils
mailing list