public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/9] [libbacktrace] Handle .gnu_debugaltlink
@ 2018-12-11 10:14 Tom de Vries
  2018-12-11 10:14 ` [PATCH 3/9] [libbacktrace] Handle alt FORMS without .gnu_debugaltlink Tom de Vries
                   ` (8 more replies)
  0 siblings, 9 replies; 47+ messages in thread
From: Tom de Vries @ 2018-12-11 10:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: Ian Lance Taylor

[ Part of this patch series was earlier posted as "[libbacktrace] Handle
DW_FORM_GNU_strp_alt" here (
https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01091.html ).

This patch series is based on the patch series submitted here (
https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01091.html).  It needs the part
that adds keeping track of units.  ]

The dwz tool attempts to optimize DWARF debugging information contained in ELF
shared libraries and ELF executables for size.

With the dwz -m option, it attempts to optimize by moving DWARF debugging
information entries (DIEs), strings and macro descriptions duplicated in
more than one object into a newly created ELF ET_REL object whose filename is
given as -m option argument.  The debug sections in the executables and
shared libraries specified on the command line are then modified again,
referring to the entities in the newly created object.

After a dwz invocation:
...
$ dwz -m c.debug a.out b.out
...
both a.out and b.out contain a .gnu_debugaltlink section referring to c.debug,
and use "DWZ DWARF multifile extensions" such as DW_FORM_GNU_strp_alt and
DW_FORM_GNU_ref_alt to refer to the content of c.debug.

The .gnu_debugaltlink consists of a filename and the expected buildid.

This patch series adds to libbacktrace:
- reading the dwarf of the .gnu_debugaltlink
- support for FORM_GNU_strp_alt and FORM_GNU_ref_alt
- a test-case btest_dwz
- a test-case printdwarftest_dwz_cmp.sh

Bootstrapped and reg-tested on x86_64.

OK for trunk?

Thanks,
- Tom

Tom de Vries (9):
  [libbacktrace] Read .gnu_debugaltlink
  [libbacktrace] Add altlink field to struct dwarf_data
  [libbacktrace] Handle alt FORMS without .gnu_debugaltlink
  [libbacktrace] Handle DW_FORM_GNU_strp_alt
  [libbacktrace] Unify function name preference handling
  [libbacktrace] Factor out read_referenced_name_1
  [libbacktrace] Handle DW_FORM_GNU_ref_alt
  [libbacktrace] Add btest_dwz test-case
  [libbacktrace] Add printdwarftest_dwz_cmp.sh test-case

 libbacktrace/Makefile.am               |  23 +++
 libbacktrace/Makefile.in               |  88 ++++++++---
 libbacktrace/configure                 |  57 ++++++-
 libbacktrace/configure.ac              |   3 +
 libbacktrace/dwarf.c                   | 274 +++++++++++++++++++++++++--------
 libbacktrace/elf.c                     | 103 ++++++++++++-
 libbacktrace/internal.h                |   4 +-
 libbacktrace/pecoff.c                  |   3 +-
 libbacktrace/printdwarftest.c          | 241 +++++++++++++++++++++++++++++
 libbacktrace/printdwarftest_dwz_cmp.sh |   8 +
 libbacktrace/xcoff.c                   |   3 +-
 11 files changed, 711 insertions(+), 96 deletions(-)
 create mode 100644 libbacktrace/printdwarftest.c
 create mode 100755 libbacktrace/printdwarftest_dwz_cmp.sh

-- 
2.16.4

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2019-01-29 15:29 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 10:14 [PATCH 0/9] [libbacktrace] Handle .gnu_debugaltlink Tom de Vries
2018-12-11 10:14 ` [PATCH 3/9] [libbacktrace] Handle alt FORMS without .gnu_debugaltlink Tom de Vries
2019-01-16  1:06   ` Ian Lance Taylor
2019-01-16 16:34     ` Tom de Vries
2019-01-16 18:24       ` Ian Lance Taylor
2018-12-11 10:14 ` [PATCH 6/9] [libbacktrace] Factor out read_referenced_name_1 Tom de Vries
2019-01-16  1:15   ` Ian Lance Taylor via gcc-patches
2019-01-16 16:37     ` Tom de Vries
2019-01-16 18:26       ` Ian Lance Taylor
2018-12-11 10:14 ` [PATCH 1/9] [libbacktrace] Read .gnu_debugaltlink Tom de Vries
2019-01-16  0:56   ` Ian Lance Taylor via gcc-patches
2019-01-16 16:26     ` Tom de Vries
2019-01-16 17:15       ` Ian Lance Taylor via gcc-patches
2019-01-16 22:48         ` Tom de Vries
2019-01-16 23:21           ` Ian Lance Taylor
2018-12-11 10:14 ` [PATCH 5/9] [libbacktrace] Unify function name preference handling Tom de Vries
2019-01-16  1:10   ` Ian Lance Taylor via gcc-patches
2018-12-11 10:14 ` [PATCH 2/9] [libbacktrace] Add altlink field to struct dwarf_data Tom de Vries
2019-01-16  1:02   ` Ian Lance Taylor
2019-01-16 16:33     ` Tom de Vries
2019-01-16 16:34       ` Tom de Vries
2019-01-16 22:20         ` Tom de Vries
2019-01-16 22:25           ` Ian Lance Taylor
2019-01-16 17:17       ` Ian Lance Taylor
2019-01-16 22:18         ` Tom de Vries
2019-01-16 22:40           ` Ian Lance Taylor
2018-12-11 10:14 ` [PATCH 9/9] [libbacktrace] Add printdwarftest_dwz_cmp.sh test-case Tom de Vries
2019-01-17 13:58   ` Tom de Vries
2019-01-18 14:24     ` Ian Lance Taylor via gcc-patches
2019-01-19  0:45       ` Tom de Vries
2019-01-19  0:54         ` Ian Lance Taylor via gcc-patches
2019-01-22 22:03           ` Tom de Vries
2019-01-29 15:31             ` Ian Lance Taylor
2018-12-11 10:14 ` [PATCH 4/9] [libbacktrace] Handle DW_FORM_GNU_strp_alt Tom de Vries
2019-01-16  1:07   ` Ian Lance Taylor via gcc-patches
2018-12-11 10:14 ` [PATCH 8/9] [libbacktrace] Add btest_dwz test-case Tom de Vries
2019-01-16  1:19   ` Ian Lance Taylor
2019-01-16 16:39     ` Tom de Vries
2019-01-16 18:30       ` Ian Lance Taylor
2018-12-11 10:14 ` [PATCH 7/9] [libbacktrace] Handle DW_FORM_GNU_ref_alt Tom de Vries
2019-01-17  0:17   ` Tom de Vries
2019-01-17  0:36     ` Ian Lance Taylor
2019-01-17 14:14       ` Tom de Vries
2019-01-17 14:16         ` Tom de Vries
2019-01-18 14:26         ` Ian Lance Taylor
2019-01-22 22:17           ` [libbacktrace] Use size_t for low_offset/high_offset fields of struct unit Tom de Vries
2019-01-22 23:05             ` Ian Lance Taylor

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).