diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-11-04 12:27:45 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-11-18 10:30:21 +0000 |
commit | 66f8b2cbbb675ccbcae56e2bdb6dae485878ec00 (patch) | |
tree | 74128ccf4156406fd2deebe1b4b092eab1b60063 /gas/doc | |
parent | f1e8bd2dd26cbe08d3722a9e12844e290e47a1d2 (diff) | |
download | gdb-66f8b2cbbb675ccbcae56e2bdb6dae485878ec00.zip gdb-66f8b2cbbb675ccbcae56e2bdb6dae485878ec00.tar.gz gdb-66f8b2cbbb675ccbcae56e2bdb6dae485878ec00.tar.bz2 |
gas: Add --gdwarf-cie-version command line flag
Add a flag to control the version of CIE that is generated. By
default gas produces CIE version 1, and this continues to be the
default after this patch.
However, a user can now provide --gdwarf-cie-version=NUMBER to switch
to either version 3 or version 4 of CIE, version 2 was never released,
and so causes an error as does any number less than 1 or greater than
4.
Producing version 4 CIE requires two new fields to be added to the
CIE, an address size field, and an segment selector field. For a flat
address space the DWARF specification indicates that the segment
selector should be 0, and the address size fields just contains the
address size in bytes. For now we support 4 or 8 byte addresses, and
the segment selector is always produced as 0. At some future time we
might need to allow targets to override this.
gas/ChangeLog:
* as.c (parse_args): Parse --gdwarf-cie-version option.
(flag_dwarf_cie_version): New variable.
* as.h (flag_dwarf_cie_version): Declare.
* dw2gencfi.c (output_cie): Switch from DW_CIE_VERSION to
flag_dwarf_cie_version.
* doc/as.texi (Overview): Document --gdwarf-cie-version.
* NEWS: Likewise.
* testsuite/gas/cfi/cfi.exp: Add new tests.
* testsuite/gas/cfi/cie-version-0.d: New file.
* testsuite/gas/cfi/cie-version-1.d: New file.
* testsuite/gas/cfi/cie-version-2.d: New file.
* testsuite/gas/cfi/cie-version-3.d: New file.
* testsuite/gas/cfi/cie-version-4.d: New file.
* testsuite/gas/cfi/cie-version.s: New file.
include/ChangeLog:
* dwarf2.h (DW_CIE_VERSION): Delete.
Change-Id: I9de19461aeb8332b5a57bbfe802953d0725a7ae8
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/as.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/doc/as.texi b/gas/doc/as.texi index b54ab1e..532ed7a 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -231,6 +231,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. [@b{--debug-prefix-map} @var{old}=@var{new}] [@b{--defsym} @var{sym}=@var{val}] [@b{-f}] [@b{-g}] [@b{--gstabs}] [@b{--gstabs+}] [@b{--gdwarf-2}] [@b{--gdwarf-sections}] + [@b{--gdwarf-cie-version}=@var{VERSION}] [@b{--help}] [@b{-I} @var{dir}] [@b{-J}] [@b{-K}] [@b{-L}] [@b{--listing-lhs-width}=@var{NUM}] [@b{--listing-lhs-width2}=@var{NUM}] [@b{--listing-rhs-width}=@var{NUM}] @@ -772,6 +773,11 @@ will have its dwarf line number information placed into a section called then debug line section will still be called just @var{.debug_line} without any suffix. +@item --gdwarf-cie-version=@var{version} +Control which version of DWARF Common Information Entries (CIEs) are produced. +When this flag is not specificed the default is version 1, though some targets +can modify this default. Other possible values for @var{version} are 3 or 4. + @ifset ELF @item --size-check=error @itemx --size-check=warning |