public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH,V3 02/15] gas: add new command line option --gsframe
Date: Sun, 30 Oct 2022 00:44:37 -0700	[thread overview]
Message-ID: <20221030074450.1956074-3-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20221030074450.1956074-1-indu.bhagat@oracle.com>

[No changes in V3, V2]

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 +++++++++-
 gas/as.h        |  3 +++
 gas/doc/as.texi |  6 ++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/gas/as.c b/gas/as.c
index d42dd5394b5..80a2cb9a418 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':
diff --git a/gas/as.h b/gas/as.h
index 730e134dce6..1b924071938 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -337,6 +337,9 @@ COMMON int flag_execstack;
 /* TRUE if .note.GNU-stack section with SEC_CODE should be created */
 COMMON int flag_noexecstack;
 
+/* TRUE if .sframe section should be created.  */
+COMMON int flag_gen_sframe;
+
 /* name of emitted object file */
 COMMON const char *out_file_name;
 
diff --git a/gas/doc/as.texi b/gas/doc/as.texi
index a0384cf1f77..83f49c518d7 100644
--- a/gas/doc/as.texi
+++ b/gas/doc/as.texi
@@ -240,6 +240,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
  [@b{--gdwarf-<N>}] [@b{--gdwarf-sections}]
  [@b{--gdwarf-cie-version}=@var{VERSION}]
  [@b{--generate-missing-build-notes=[no|yes]}]
+ [@b{--gsframe}]
  [@b{--hash-size}=@var{N}]
  [@b{--help}] [@b{--target-help}]
  [@b{-I} @var{dir}]
@@ -847,6 +848,11 @@ These options control whether the ELF assembler should generate GNU Build
 attribute notes if none are present in the input sources.
 The default can be controlled by the @option{--enable-generate-build-notes}
 configure option.
+
+@item --gsframe
+@itemx --gsframe
+Create @var{.sframe} section from CFI directives.
+
 @end ifset
 
 @item --hash-size @var{N}
-- 
2.37.2


  parent reply	other threads:[~2022-10-30  7:45 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30  7:44 [PATCH,V3 00/15] Definition and support for SFrame unwind format Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 01/15] sframe.h: Add SFrame format definition Indu Bhagat
2022-10-30  7:44 ` Indu Bhagat [this message]
2022-10-30  7:44 ` [PATCH,V3 03/15] gas: generate .sframe from CFI directives Indu Bhagat
2022-10-30  8:03   ` Mike Frysinger
2022-11-06  5:30     ` Indu Bhagat
2022-11-06  5:36     ` [PATCH,V3.1 " Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 04/15] gas: testsuite: add new tests for SFrame unwind info Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 05/15] libsframe: add the SFrame library Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 06/15] bfd: linker: merge .sframe sections Indu Bhagat
2022-10-30 13:33   ` Mike Frysinger
2022-10-30  7:44 ` [PATCH,V3 07/15] readelf/objdump: support for SFrame section Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 08/15] unwinder: generate backtrace using SFrame format Indu Bhagat
2022-10-30 14:03   ` Mike Frysinger
2022-11-01 22:36     ` [PATCH, V3 " Weimin Pan
2022-11-02 15:00       ` Mike Frysinger
2022-11-02  6:23     ` [PATCH,V3 " Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 09/15] unwinder: Add SFrame unwinder tests Indu Bhagat
2022-10-30 14:14   ` Mike Frysinger
2022-10-30  7:44 ` [PATCH,V3 10/15] gdb: sim: buildsystem changes to accommodate libsframe Indu Bhagat
2022-10-30 14:15   ` [PATCH, V3 " Mike Frysinger
2022-10-31 20:39     ` Indu Bhagat
2022-11-02 15:02       ` Mike Frysinger
2022-11-02 19:11         ` Jose E. Marchesi
2022-11-03 15:27           ` Mike Frysinger
2022-11-04 12:14             ` Jose E. Marchesi
2022-10-30  7:44 ` [PATCH,V3 11/15] libctf: add libsframe to LDFLAGS and LIBS Indu Bhagat
2022-10-30 13:27   ` Mike Frysinger
2022-10-31 20:06     ` Indu Bhagat
2022-11-01 18:57       ` Nick Alcock
2022-11-01 21:42         ` Andreas Schwab
2022-11-02 13:16           ` Nick Alcock
2022-11-04 19:02             ` [PATCH,V3.1,11/15] " Indu Bhagat
2022-11-04 21:01             ` [PATCH,V3.2,11/15] " Indu Bhagat
2022-11-05  9:21               ` Andreas Schwab
2022-11-07 22:28                 ` [PATCH,V3.3 11/15] " Indu Bhagat
2022-11-08  3:26                   ` Mike Frysinger
2022-11-08 19:26                     ` Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 12/15] src-release.sh: Add libsframe Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 13/15] binutils/NEWS: add text for SFrame support Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 14/15] gas/NEWS: add text about new command line option and " Indu Bhagat
2022-10-30  8:05   ` [PATCH, V3 " Mike Frysinger
2022-10-31 23:17     ` Indu Bhagat
2022-10-30  7:44 ` [PATCH,V3 15/15] doc: add SFrame spec file Indu Bhagat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221030074450.1956074-3-indu.bhagat@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).