From b07a29781610756a9b75a931c7c13735b7555d9f Mon Sep 17 00:00:00 2001 From: Indu Bhagat Date: Tue, 15 Nov 2022 15:06:39 -0800 Subject: gas: add new command line option --gsframe When --gsframe is specified, the assembler will generate a .sframe section from the CFI directives in the assembly. ChangeLog: * gas/as.c (parse_args): Parse args and set flag_gen_sframe. * gas/as.h: Introduce skeleton for --gsframe. * gas/doc/as.texi: document --gsframe. --- gas/as.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gas/as.c') diff --git a/gas/as.c b/gas/as.c index d42dd53..80a2cb9 100644 --- a/gas/as.c +++ b/gas/as.c @@ -315,6 +315,8 @@ Options:\n\ #endif fprintf (stream, _("\ generate GNU Build notes if none are present in the input\n")); + fprintf (stream, _("\ + --gsframe generate SFrame unwind info\n")); #endif /* OBJ_ELF */ fprintf (stream, _("\ @@ -499,7 +501,8 @@ parse_args (int * pargc, char *** pargv) OPTION_COMPRESS_DEBUG, OPTION_NOCOMPRESS_DEBUG, OPTION_NO_PAD_SECTIONS, - OPTION_MULTIBYTE_HANDLING /* = STD_BASE + 40 */ + OPTION_MULTIBYTE_HANDLING, /* = STD_BASE + 40 */ + OPTION_SFRAME /* When you add options here, check that they do not collide with OPTION_MD_BASE. See as.h. */ }; @@ -530,6 +533,7 @@ parse_args (int * pargc, char *** pargv) ,{"elf-stt-common", required_argument, NULL, OPTION_ELF_STT_COMMON} ,{"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 ,{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL} ,{"gdwarf-2", no_argument, NULL, OPTION_GDWARF_2} @@ -993,6 +997,10 @@ This program has absolutely no warranty.\n")); optarg); break; + case OPTION_SFRAME: + flag_gen_sframe = 1; + break; + #endif /* OBJ_ELF */ case 'Z': -- cgit v1.1