diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-11-04 23:03:10 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-11-28 00:03:05 +0000 |
commit | 0ac2b354ee006d94d6fc46bea08f39f99b18f869 (patch) | |
tree | e835558df4225cb8542515eb3ab5a65eaeef924b /gas/as.c | |
parent | 22eb4a06176dfef554008a62844e0ce30df2260f (diff) | |
download | gdb-0ac2b354ee006d94d6fc46bea08f39f99b18f869.zip gdb-0ac2b354ee006d94d6fc46bea08f39f99b18f869.tar.gz gdb-0ac2b354ee006d94d6fc46bea08f39f99b18f869.tar.bz2 |
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
Diffstat (limited to 'gas/as.c')
-rw-r--r-- | gas/as.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -95,10 +95,12 @@ int debug_memory = 0; /* Enable verbose mode. */ int verbose = 0; -/* Which version of DWARF CIE to produce. The default could be overridden - by a target during its initialisation, or by the --gdwarf-cie-version - command line flag. */ -int flag_dwarf_cie_version = 1; +/* Which version of DWARF CIE to produce. This default value of -1 + indicates that this value has not been set yet, a default value is + provided in dwarf2_init. A different value can also be supplied by the + command line flag --gdwarf-cie-version, or by a target in + MD_AFTER_PARSE_ARGS. */ +int flag_dwarf_cie_version = -1; #if defined OBJ_ELF || defined OBJ_MAYBE_ELF int flag_use_elf_stt_common = DEFAULT_GENERATE_ELF_STT_COMMON; |