From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Subject: [PATCH,RFC,V2 2/8] gas: add new command line option --gctf-frame
Date: Thu, 19 May 2022 01:30:18 -0700 [thread overview]
Message-ID: <20220519083024.2709920-3-indu.bhagat@oracle.com> (raw)
In-Reply-To: <20220519083024.2709920-1-indu.bhagat@oracle.com>
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 0262a6fec98..c7e18cd6d9b 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -331,6 +331,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, _("\
@@ -504,7 +506,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. */
};
@@ -535,6 +538,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}
@@ -1008,6 +1012,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 135abc8f23d..70b5ab94440 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -329,6 +329,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.31.1
next prev parent reply other threads:[~2022-05-19 8:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 8:30 [PATCH,RFC,V2 0/8] Definition and Implementation of CTF Frame format Indu Bhagat
2022-05-19 8:30 ` [PATCH,RFC,V2 1/8] ctf-frame.h: Add CTF Frame format definition Indu Bhagat
2022-05-19 8:30 ` Indu Bhagat [this message]
2022-05-19 8:30 ` [PATCH,RFC,V2 3/8] gas: generate .ctf_frame Indu Bhagat
2022-05-19 8:30 ` [PATCH,RFC,V2 4/8] libctfframe: add the CTF Frame library Indu Bhagat
2022-05-19 8:30 ` [PATCH,RFC,V2 5/8] bfd: linker: merge .ctf_frame sections Indu Bhagat
2022-05-19 8:30 ` [PATCH,RFC,V2 6/8] readelf/objdump: support for CTF Frame section Indu Bhagat
2022-05-19 8:30 ` [PATCH, RFC, V2 7/8] unwinder: generate backtrace using CTF Frame format Indu Bhagat
2022-05-19 8:30 ` [PATCH, RFC, V2 8/8] gdb: sim: buildsystem changes to accommodate libctfframe Indu Bhagat
2022-05-27 16:20 ` [PATCH,RFC,V2 0/8] Definition and Implementation of CTF Frame format 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=20220519083024.2709920-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).