From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114751 invoked by alias); 11 Dec 2018 10:14:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 114711 invoked by uid 89); 11 Dec 2018 10:14:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.2 spammy=alt, Makefile.in, makefile.in, UD:Makefile.in X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Dec 2018 10:13:57 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 83A38ACE3; Tue, 11 Dec 2018 10:13:55 +0000 (UTC) From: Tom de Vries To: gcc-patches@gcc.gnu.org Cc: Ian Lance Taylor Subject: [PATCH 0/9] [libbacktrace] Handle .gnu_debugaltlink Date: Tue, 11 Dec 2018 10:14:00 -0000 Message-Id: <20181211101411.7067-1-tdevries@suse.de> X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00639.txt.bz2 [ 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