generate GNU Build notes if none are present in the input\n"));
fprintf (stream, _("\
--gsframe generate SFrame stack trace information\n"));
+# if defined (TARGET_USE_SCFI) && defined (TARGET_USE_GINSN)
+ fprintf (stream, _("\
+ --scfi=experimental Synthesize DWARF CFI for hand-written asm\n\
+ (experimental support)\n"));
+# endif
#endif /* OBJ_ELF */
fprintf (stream, _("\
OPTION_NOCOMPRESS_DEBUG,
OPTION_NO_PAD_SECTIONS,
OPTION_MULTIBYTE_HANDLING, /* = STD_BASE + 40 */
- OPTION_SFRAME
+ OPTION_SFRAME,
+ OPTION_SCFI
/* When you add options here, check that they do
not collide with OPTION_MD_BASE. See as.h. */
};
,{"sectname-subst", no_argument, NULL, OPTION_SECTNAME_SUBST}
,{"generate-missing-build-notes", required_argument, NULL, OPTION_ELF_BUILD_NOTES}
,{"gsframe", no_argument, NULL, OPTION_SFRAME}
-#endif
+# if defined (TARGET_USE_SCFI) && defined (TARGET_USE_GINSN)
+ ,{"scfi", required_argument, NULL, OPTION_SCFI}
+# endif
+#endif /* OBJ_ELF || OBJ_MAYBE_ELF. */
,{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
,{"gdwarf-2", no_argument, NULL, OPTION_GDWARF_2}
,{"gdwarf-3", no_argument, NULL, OPTION_GDWARF_3}
flag_execstack = 0;
break;
+# if defined (TARGET_USE_SCFI) && defined (TARGET_USE_GINSN)
+ case OPTION_SCFI:
+ if (optarg && strcasecmp (optarg, "experimental") == 0)
+ flag_synth_cfi = SYNTH_CFI_EXPERIMENTAL;
+ else
+ as_fatal (_("Invalid --scfi= option: `%s'; suggested option: experimental"),
+ optarg);
+ break;
+# endif
+
case OPTION_SIZE_CHECK:
if (strcasecmp (optarg, "error") == 0)
flag_allow_nonconst_size = false;
[@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}]
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