gas/riscv: Produce version 3 DWARF CIE by default
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 4 Nov 2019 23:03:10 +0000 (23:03 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 28 Nov 2019 00:03:05 +0000 (00:03 +0000)
commit0ac2b354ee006d94d6fc46bea08f39f99b18f869
treee835558df4225cb8542515eb3ab5a65eaeef924b
parent22eb4a06176dfef554008a62844e0ce30df2260f
gas/riscv: Produce version 3 DWARF CIE by default

The flag controlling the default DWARF CIE version to produce now
starts with the value -1.  This can be modified with the command line
flag as before, but after command line flag processing, in
md_after_parse_args targets can, if the global still has the value -1,
override this value.  This gives a target specific default.

If a CIE version is not select either by command line flag, or a
target specific default, then some new code in dwarf2_init now select
a global default.  This remains as version 1 to match previous
behaviour.

This RISC-V has a target specific default of version provided, this
make the return column uleb128, which means we can use all DWARF
registers include CSRs.

I chose to switch to version 3 rather than version 4 as this is most
similar to the global default (version 1).  Switching to version 4
adds additional columns to the CIE header.

gas/ChangeLog:

* as.c (flag_dwarf_cie_version): Change initial value to -1, and
update comment.
* config/tc-riscv.c (riscv_after_parse_args): Set
flag_dwarf_cie_version if it has not already been set.
* dwarf2dbg.c (dwarf2_init): Initialise flag_dwarf_cie_version if
needed.
* testsuite/gas/riscv/default-cie-version.d: New file.
* testsuite/gas/riscv/default-cie-version.s: New file.

ld/ChangeLog:

* testsuite/ld-elf/eh5.d: Accept version 3 DWARF CIE.

Change-Id: Ibbfe8f0979fba480bf0a359978b09d2b3055555e
gas/ChangeLog
gas/as.c
gas/config/tc-riscv.c
gas/dwarf2dbg.c
gas/testsuite/gas/riscv/default-cie-version.d [new file with mode: 0644]
gas/testsuite/gas/riscv/default-cie-version.s [new file with mode: 0644]
ld/ChangeLog
ld/testsuite/ld-elf/eh5.d
This page took 0.025845 seconds and 4 git commands to generate.