public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Cc: amodra@gmail.com, weimin.pan@oracle.com,
	Indu Bhagat <indu.bhagat@oracle.com>
Subject: [PATCH,V6 02/10] gas: add new command line option --gctf-frame
Date: Tue,  2 Aug 2022 01:04:44 -0700	[thread overview]
Message-ID: <20220802080452.1143351-3-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20220802080452.1143351-1-indu.bhagat@oracle.com>

[No changes from V5, V4, V3]

When --gctf-frame is specified, the assembler will generate a .ctf_frame
section from the CFI directives in the assembly.

ChangeLog:
	* gas/as.c (parse_args): Parse args and set flag_gen_ctf_frame.
	* gas/as.h: Introduce skeleton for --gctf-frame.
	* gas/doc/as.texi: document --gctf-frame.
---
 gas/as.c        | 10 +++++++++-
 gas/as.h        |  3 +++
 gas/doc/as.texi |  5 +++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/gas/as.c b/gas/as.c
index 6268779cf90..cacf5d6aa48 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -318,6 +318,8 @@ Options:\n\
 #endif
   fprintf (stream, _("\
                           generate GNU Build notes if none are present in the input\n"));
+  fprintf (stream, _("\
+  --gctf-frame            generate CTF Frame unwind info\n"));
 #endif /* OBJ_ELF */
 
   fprintf (stream, _("\
@@ -491,7 +493,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_CTF_FRAME
     /* When you add options here, check that they do
        not collide with OPTION_MD_BASE.  See as.h.  */
     };
@@ -522,6 +525,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}
+    ,{"gctf-frame", no_argument, NULL, OPTION_CTF_FRAME}
 #endif
     ,{"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL}
     ,{"gdwarf-2", no_argument, NULL, OPTION_GDWARF_2}
@@ -987,6 +991,10 @@ This program has absolutely no warranty.\n"));
 		      optarg);
 	  break;
 
+	case OPTION_CTF_FRAME:
+	  flag_gen_ctf_frame = 1;
+	  break;
+
 #endif /* OBJ_ELF */
 
 	case 'Z':
diff --git a/gas/as.h b/gas/as.h
index ff665c75812..92e039b163a 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 .ctf_frame section should be created.  */
+COMMON int flag_gen_ctf_frame;
+
 /* name of emitted object file */
 COMMON const char *out_file_name;
 
diff --git a/gas/doc/as.texi b/gas/doc/as.texi
index 09b0ca5f565..c74b9eee3d6 100644
--- a/gas/doc/as.texi
+++ b/gas/doc/as.texi
@@ -245,6 +245,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
  [@b{--sectname-subst}] [@b{--size-check=[error|warning]}]
  [@b{--elf-stt-common=[no|yes]}]
  [@b{--generate-missing-build-notes=[no|yes]}]
+ [@b{--gctf-frame}]
  [@b{--multibyte-handling=[allow|warn|warn-sym-only]}]
  [@b{--target-help}] [@var{target-options}]
  [@b{--}|@var{files} @dots{}]
@@ -825,6 +826,10 @@ 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 --gctf-frame
+@itemx --gctf-frame
+Create @var{.ctf_frame} section from CFI directives.
+
 @end ifset
 
 @item --help
-- 
2.37.1


  parent reply	other threads:[~2022-08-02  8:07 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02  8:04 [PATCH,V6 00/10] Definition and Implementation of CTF Frame format Indu Bhagat
2022-08-02  8:04 ` [PATCH,V6 01/10] ctf-frame.h: Add CTF Frame format definition Indu Bhagat
2022-08-15 12:04   ` Nick Clifton
2022-08-02  8:04 ` Indu Bhagat [this message]
2022-08-15 12:07   ` [PATCH,V6 02/10] gas: add new command line option --gctf-frame Nick Clifton
2022-08-02  8:04 ` [PATCH,V6 03/10] gas: generate .ctf_frame Indu Bhagat
2022-08-15 12:22   ` Nick Clifton
2022-08-02  8:04 ` [PATCH,V6 04/10] libctfframe: add the CTF Frame library Indu Bhagat
2022-08-15 12:46   ` Nick Clifton
2022-08-02  8:04 ` [PATCH,V6 05/10] libctfframe: add GNU poke pickles for CTF Frame Indu Bhagat
2022-08-15 12:50   ` Nick Clifton
2022-08-02  8:04 ` [PATCH,V6 06/10] bfd: linker: merge .ctf_frame sections Indu Bhagat
2022-08-15 13:02   ` Nick Clifton
2022-08-18  2:11     ` Indu Bhagat
2022-08-02  8:04 ` [PATCH,V6 07/10] readelf/objdump: support for CTF Frame section Indu Bhagat
2022-08-15 13:11   ` Nick Clifton
2022-08-02  8:04 ` [PATCH,V6 08/10] unwinder: generate backtrace using CTF Frame format Indu Bhagat
2022-08-15 13:16   ` Nick Clifton
2022-08-02  8:04 ` [PATCH,V6 09/10] unwinder: Add CTF Frame unwinder tests Indu Bhagat
2022-08-15 13:27   ` Nick Clifton
2022-08-02  8:04 ` [PATCH, V6 10/10] gdb: sim: buildsystem changes to accommodate libctfframe Indu Bhagat
2022-08-05 14:43   ` Tom Tromey
2022-08-15 12:18 ` [PATCH,V6 00/10] Definition and Implementation of CTF Frame format Nick Clifton
2022-08-18  1:38   ` Indu Bhagat
2022-08-15 14:25 ` Nick Clifton
2022-09-30  0:04   ` [PATCH,V1 00/14] Definition and support for SFrame unwind format Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 01/14] sframe.h: Add SFrame format definition Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 02/14] gas: add new command line option --gsframe Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 03/14] gas: generate .sframe from CFI directives Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 04/14] gas: testsuite: add new tests for SFrame unwind info Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 05/14] libsframe: add the SFrame library Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 06/14] bfd: linker: merge .sframe sections Indu Bhagat
2022-09-30 10:51       ` Nick Clifton
2022-09-30  0:04     ` [PATCH,V1 07/14] readelf/objdump: support for SFrame section Indu Bhagat
2022-09-30 11:08       ` Nick Clifton
2022-09-30  0:04     ` [PATCH,V1 08/14] unwinder: generate backtrace using SFrame format Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 09/14] unwinder: Add SFrame unwinder tests Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 10/14] gdb: sim: buildsystem changes to accommodate libsframe Indu Bhagat
2022-10-11 16:08       ` [PATCH, V1 " Tom Tromey
2022-09-30  0:04     ` [PATCH,V1 11/14] libctf: add libsframe to LDFLAGS and LIBS Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 12/14] src-release.sh: Add libsframe Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 13/14] binutils/NEWS: add text for SFrame support Indu Bhagat
2022-09-30  0:04     ` [PATCH,V1 14/14] gas/NEWS: add text about new command line option and " Indu Bhagat
2022-09-30  8:09     ` [PATCH,V1 00/14] Definition and support for SFrame unwind format Jan Beulich
2022-10-04  5:16       ` Indu Bhagat
2022-10-04  6:53         ` Jan Beulich
2022-09-30  8:24     ` Fangrui Song
2022-10-01  0:15       ` Indu Bhagat
2022-09-30  9:12     ` Nick Clifton
2022-10-01  0:29       ` Indu Bhagat
2022-10-01  9:51       ` Jose E. Marchesi

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=20220802080452.1143351-3-indu.bhagat@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=weimin.pan@oracle.com \
    /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).