diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2024-01-15 01:00:13 -0800 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2024-01-15 03:31:35 -0800 |
commit | ad9bd833d48cd56697406f82ff2769a6a1dc5db7 (patch) | |
tree | fb2f17bc25c3affd840ffd9f2f4d5022ab46ce78 /gas/doc | |
parent | 5802d3f47387f176380e143ee1a9ec202a679f5c (diff) | |
download | gdb-ad9bd833d48cd56697406f82ff2769a6a1dc5db7.zip gdb-ad9bd833d48cd56697406f82ff2769a6a1dc5db7.tar.gz gdb-ad9bd833d48cd56697406f82ff2769a6a1dc5db7.tar.bz2 |
gas: add new command line option --scfi=experimental
When the command line option --scfi=experimenta is passed to the GNU
assembler, it will synthesize DWARF call frame information (CFI) for the
input assembly.
The option --scfi=experimental will also ignore most of the existing
.cfi_* directives, if already contained in the provided input file.
Only the following CFI directives will not be ignored:
- .cfi_sections,
- .cfi_label,
- .cfi_signal_frame
To use SCFI, a target will need to:
- define TARGET_USE_SCFI and TARGET_USE_GINSN, and other necessary
definitions,
- provide means to help GAS understand the target specific instruction
semantics by creating ginsns.
The upcoming support for SCFI is inteded to be experimental, hence the
option --scfi=experimental. The --scfi= may see more options like
--scfi=[all,none] added in future, once the SCFI support in GAS is
mature and robust. The offering may also see for example, an
--scfi=inline option for dealing with inline asm may be added in the
future. In --scfi=inline option, the GNU assembler may consume (and not
ignore) the compiler generated CFI for the code surrounding the inline
asm.
Also document the option.
gas/
* as.c (show_usage): Add support for --scfi=experimental.
(parse_args): Likewise.
* as.h (enum synth_cfi_type): Define new type.
* doc/as.texi: Document the new option.
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/as.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gas/doc/as.texi b/gas/doc/as.texi index 7526b22..370f40f 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -255,6 +255,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. [@b{--multibyte-handling=[allow|warn|warn-sym-only]}] [@b{--no-pad-sections}] [@b{-o} @var{objfile}] [@b{-R}] + [@b{--scfi=experimental}] [@b{--sectname-subst}] [@b{--size-check=[error|warning]}] [@b{--statistics}] @@ -932,6 +933,20 @@ Ignored. Supported for compatibility with tools that apss the same option to both the assembler and the linker. @ifset ELF +@item --scfi=experimental +This option controls whether the assembler should synthesize CFI for +hand-written input. If the input already contains some synthesizable CFI +directives, the assembler ignores them and emits a warning. Note that +@code{--scfi=experimental} is not intended to be used for compiler-generated +code, including inline assembly. This experimental support is work in +progress. Only System V AMD64 ABI is supported. + +Each input function in assembly must begin with the @code{.type} directive, and +should ideally be closed off using a @code{.size} directive. When using SCFI, +each @code{.type} directive prompts GAS to start a new FDE (a.k.a., Function +Descriptor Entry). This implies that with each @code{.type} directive, a +previous block of instructions, if any, is finalised as a distinct FDE. + @item --sectname-subst Honor substitution sequences in section names. @ifclear man |