public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: binutils@sourceware.org
Subject: [PATCH,RFC,V2 0/8] Definition and Implementation of CTF Frame format
Date: Thu, 19 May 2022 01:30:16 -0700	[thread overview]
Message-ID: <20220519083024.2709920-1-indu.bhagat@oracle.com> (raw)

Hello,

Thanks for your comments on the version V1 of the patch series.

This is a refresh of the previously sent RFC series 
https://sourceware.org/pipermail/binutils/2022-May/120731.html.

The commit log of each patch in this series specifies the changes from V1 of
the respective patch.  Briefly, following are the main changes in the current
version V2 as compared to V1:

1. GAS now supports a new command line option --gctf-frame.  This command line
option instructs GAS to generate .ctf_frame section from CFI directives.  The
user can either specify --gctf-frame or use ".cfi_sections" directive with
".ctf_frame" to generate .ctf_frame sections.
2. Some code cleanup, improvements and bugfixes.
3. libctfbacktrace has required some buildsystem changes.  libctfbacktrace is
the ".ctf_frame unwinding library", and as such needs CTF Frame unwind
information for itself to work.  So the buildsystem checks if the available
assembler supports --gctf-frame, if so, libctfbacktrace is generated with "-Wa,
--gctf-frame".
4. Regression testing for some aarch64 and x86 targets.

This is a work in progress.  There still remain open issues to be resolved,
crude code stubs to be revisited, addition of testsuites, and more regression
testing testing.  This will be taken care of in subsequent iterations of the
series.

Important note: libctfframe/configure has NOT been included in the patch
series, as it causes the size of some patches to go beyond the allowed limit.
Please regenerate the libctfframe/configure after applying the series.

Please comment and provide feedback, it will help shape the format.  Here are a
few of the aspects that particularly need discussion:

1. What is a good place for an unwinder based on CTF Frame format ? Currently
to facilitate discussion, it is presented in a library of its own:
libctfbacktrace which, in turn, uses the libctfframe library for decoding the
.ctf_frame section for unwinding.  We brainstormed a bit about the possible
candidates being libbacktace, libgcc or libunwind ? Are there any
recommendations ?
2. Are there some ideas for smartly dealing with the issue of bloat caused by
the CTF Frame unwind information for the PLT entries ?
 
Thanks,

Indu Bhagat (6):
  ctf-frame.h: Add CTF Frame format definition
  gas: add new command line option --gctf-frame
  gas: generate .ctf_frame
  bfd: linker: merge .ctf_frame sections
  readelf/objdump: support for CTF Frame section
  gdb: sim: buildsystem changes to accommodate libctfframe

Weimin Pan (2):
  libctfframe: add the CTF Frame library
  unwinder: generate backtrace using CTF Frame format

 Makefile.def                            |    5 +
 Makefile.in                             | 1289 ++++++++++++++++++-
 bfd/Makefile.am                         |    6 +-
 bfd/Makefile.in                         |    7 +-
 bfd/bfd-in2.h                           |    1 +
 bfd/configure                           |    2 +-
 bfd/configure.ac                        |    2 +-
 bfd/elf-bfd.h                           |   55 +
 bfd/elf-ctf-frame.c                     |  490 ++++++++
 bfd/elf.c                               |   32 +
 bfd/elf64-x86-64.c                      |   97 +-
 bfd/elflink.c                           |   52 +
 bfd/elfxx-x86.c                         |  336 ++++-
 bfd/elfxx-x86.h                         |   46 +
 bfd/section.c                           |    1 +
 binutils/Makefile.am                    |   10 +-
 binutils/Makefile.in                    |   10 +-
 binutils/doc/binutils.texi              |    4 +
 binutils/doc/ctfframe.options.texi      |   10 +
 binutils/objdump.c                      |   76 ++
 binutils/readelf.c                      |   47 +
 config/ctf-frame.m4                     |   16 +
 configure                               |    2 +-
 configure.ac                            |    2 +-
 gas/Makefile.am                         |    3 +
 gas/Makefile.in                         |   22 +-
 gas/as.c                                |   10 +-
 gas/as.h                                |   13 +-
 gas/config/tc-aarch64.c                 |   42 +
 gas/config/tc-aarch64.h                 |   29 +
 gas/config/tc-i386.c                    |   46 +
 gas/config/tc-i386.h                    |   26 +
 gas/config/tc-xtensa.c                  |    1 +
 gas/ctffreopt.c                         |  158 +++
 gas/doc/as.texi                         |   19 +-
 gas/dw2gencfi.c                         |   30 +
 gas/dw2gencfi.h                         |    1 +
 gas/gen-ctf-frame.c                     | 1212 ++++++++++++++++++
 gas/gen-ctf-frame.h                     |  142 +++
 gas/write.c                             |   13 +
 gdb/Makefile.in                         |    8 +-
 gdb/acinclude.m4                        |    4 +-
 gdb/configure                           |   35 +-
 gdb/configure.ac                        |   11 +
 include/ctf-backtrace-api.h             |   57 +
 include/ctf-frame-api.h                 |  213 ++++
 include/ctf-frame.h                     |  257 ++++
 include/elf/common.h                    |    1 +
 include/elf/internal.h                  |    1 +
 ld/Makefile.am                          |    2 +
 ld/Makefile.in                          |    2 +
 ld/configure                            |    8 +-
 ld/configure.ac                         |    3 +
 ld/ld.texi                              |    4 +-
 ld/scripttempl/elf.sc                   |    2 +
 ld/testsuite/ld-bootstrap/bootstrap.exp |    8 +-
 libctfframe/Makefile.am                 |   50 +
 libctfframe/Makefile.in                 |  982 +++++++++++++++
 libctfframe/aclocal.m4                  | 1242 ++++++++++++++++++
 libctfframe/config.h.in                 |  144 +++
 libctfframe/configure.ac                |   82 ++
 libctfframe/ctf-backtrace-err.c         |   46 +
 libctfframe/ctf-backtrace.c             |  617 +++++++++
 libctfframe/ctf-frame-dump.c            |  173 +++
 libctfframe/ctf-frame-error.c           |   49 +
 libctfframe/ctf-frame-impl.h            |   55 +
 libctfframe/ctf-frame.c                 | 1525 +++++++++++++++++++++++
 libctfframe/ttest.c                     |   78 ++
 sim/common/Make-common.in               |    7 +-
 69 files changed, 9973 insertions(+), 58 deletions(-)
 create mode 100644 bfd/elf-ctf-frame.c
 create mode 100644 binutils/doc/ctfframe.options.texi
 create mode 100644 config/ctf-frame.m4
 create mode 100644 gas/ctffreopt.c
 create mode 100644 gas/gen-ctf-frame.c
 create mode 100644 gas/gen-ctf-frame.h
 create mode 100644 include/ctf-backtrace-api.h
 create mode 100644 include/ctf-frame-api.h
 create mode 100644 include/ctf-frame.h
 create mode 100644 libctfframe/Makefile.am
 create mode 100644 libctfframe/Makefile.in
 create mode 100644 libctfframe/aclocal.m4
 create mode 100644 libctfframe/config.h.in
 create mode 100644 libctfframe/configure.ac
 create mode 100644 libctfframe/ctf-backtrace-err.c
 create mode 100644 libctfframe/ctf-backtrace.c
 create mode 100644 libctfframe/ctf-frame-dump.c
 create mode 100644 libctfframe/ctf-frame-error.c
 create mode 100644 libctfframe/ctf-frame-impl.h
 create mode 100644 libctfframe/ctf-frame.c
 create mode 100644 libctfframe/ttest.c

-- 
2.31.1


             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 Indu Bhagat [this message]
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 ` [PATCH,RFC,V2 2/8] gas: add new command line option --gctf-frame Indu Bhagat
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-1-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).