aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-11-04 23:03:10 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-11-28 00:03:05 +0000
commit0ac2b354ee006d94d6fc46bea08f39f99b18f869 (patch)
treee835558df4225cb8542515eb3ab5a65eaeef924b /ld
parent22eb4a06176dfef554008a62844e0ce30df2260f (diff)
downloadbinutils-0ac2b354ee006d94d6fc46bea08f39f99b18f869.zip
binutils-0ac2b354ee006d94d6fc46bea08f39f99b18f869.tar.gz
binutils-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 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/testsuite/ld-elf/eh5.d12
2 files changed, 10 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 969ab78..adca95f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2019-11-27 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * testsuite/ld-elf/eh5.d: Accept version 3 DWARF CIE.
+
2019-11-26 Martin Liska <mliska@suse.cz>
* scripttempl/arclinux.sc: Add .text.sorted.* which is sorted
diff --git a/ld/testsuite/ld-elf/eh5.d b/ld/testsuite/ld-elf/eh5.d
index b74d4cf..e61db61 100644
--- a/ld/testsuite/ld-elf/eh5.d
+++ b/ld/testsuite/ld-elf/eh5.d
@@ -9,7 +9,7 @@
Contents of the .eh_frame section:
0+0000 0+001[04] 0+0000 CIE
- Version: 1
+ Version: [13]
Augmentation: "zR"
Code alignment factor: .*
Data alignment factor: .*
@@ -28,7 +28,7 @@ Contents of the .eh_frame section:
DW_CFA_nop
0+00(2c|30) 0+0014 0+0000 CIE
- Version: 1
+ Version: [13]
Augmentation: "zPR"
Code alignment factor: .*
Data alignment factor: .*
@@ -52,7 +52,7 @@ Contents of the .eh_frame section:
DW_CFA_nop
0+007[48] 0+001[8c] 0+0000 CIE
- Version: 1
+ Version: [13]
Augmentation: "zPLR"
Code alignment factor: .*
Data alignment factor: .*
@@ -73,7 +73,7 @@ Contents of the .eh_frame section:
DW_CFA_nop
0+00b[08] 0+001[04] 0+0000 CIE
- Version: 1
+ Version: [13]
Augmentation: "zR"
Code alignment factor: .*
Data alignment factor: .*
@@ -88,7 +88,7 @@ Contents of the .eh_frame section:
DW_CFA_nop
#...
0+00[de]8 0+0014 0+0000 CIE
- Version: 1
+ Version: [13]
Augmentation: "zPR"
Code alignment factor: .*
Data alignment factor: .*
@@ -110,7 +110,7 @@ Contents of the .eh_frame section:
DW_CFA_nop
#...
0+01(1c|30) 0+001[8c] 0+0000 CIE
- Version: 1
+ Version: [13]
Augmentation: "zPLR"
Code alignment factor: .*
Data alignment factor: .*