From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4776 invoked by alias); 19 Apr 2019 19:42:10 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 4666 invoked by uid 48); 19 Apr 2019 19:42:06 -0000 From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/24468] New: dwz -m generates partial unit without import Date: Tue, 01 Jan 2019 00:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q2/txt/msg00024.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24468 Bug ID: 24468 Summary: dwz -m generates partial unit without import Product: dwz Version: unspecified Status: NEW Severity: normal Priority: P2 Component: default Assignee: nobody at sourceware dot org Reporter: vries at gcc dot gnu.org CC: dwz at sourceware dot org Target Milestone: --- Say we make hello and dwz -m it: ... $ rm -f hello $ make hello=20 cc /data/dwz/dwz.git/testsuite/dwz.tests/hello.c -o hello -g $ cp hello 1; cp 1 2; ./dwz -m 3 1 2 ... In the original hello, we find long double in elf-init.c, as printed by gdb info types: ... $ gdb hello -ex "info types" -batch | egrep "long double|^File" File /data/dwz/dwz.git/testsuite/dwz.tests/hello.c: File /usr/include/bits/types.h: File /usr/include/libio.h: File /usr/lib64/gcc/x86_64-suse-linux/7/include/stddef.h: File elf-init.c: typedef long double; File init.c: ... but in the dwz-m optimized 1, it's no longer there: ... $ gdb 1 -ex "info types" -batch | egrep "long double|^File" File /usr/include/bits/types.h: File /usr/include/libio.h: File /usr/lib64/gcc/x86_64-suse-linux/7/include/stddef.h: File : ... Grepping the import tree: ... $ readelf -w 1 > READELF $ grep '<.*>:.*DW_TAG_partial_unit' READELF <0>: Abbrev Number: 31 (DW_TAG_partial_unit) <0>: Abbrev Number: 14 (DW_TAG_partial_unit) <0><43>: Abbrev Number: 14 (DW_TAG_partial_unit) <0><69>: Abbrev Number: 14 (DW_TAG_partial_unit) <0><2b5>: Abbrev Number: 14 (DW_TAG_partial_unit) <0><33b>: Abbrev Number: 14 (DW_TAG_partial_unit) $ grep 'DW_AT_import.*:' READELF=20=20 <15> DW_AT_import : <1a> DW_AT_import : <6b> DW_AT_import : <0xb> [Abbrev Number: 31] DW_AT_import : DW_AT_import : DW_AT_import : <0xb> [Abbrev Number: 31] <2e0> DW_AT_import : <2e5> DW_AT_import : ... we find a partial unit at 2b5 that is not imported anywhere. And indeed, that's the one defining long double: ... Compilation Unit @ offset 0x2aa: Length: 0x82 (32-bit) Version: 4 Abbrev Offset: 0x0 Pointer Size: 8 <0><2b5>: Abbrev Number: 14 (DW_TAG_partial_unit) <2b6> DW_AT_stmt_list : 0x0 <2ba> DW_AT_comp_dir : (indirect string, offset: 0x635): /home/abuild/rpmbuild/BUILD/glibc-2.26/csu ... <1><2ca>: Abbrev Number: 24 (DW_TAG_base_type) <2cb> DW_AT_byte_size : 16 <2cc> DW_AT_encoding : 4 (float) <2cd> DW_AT_name : (indirect string, offset: 0x403): long doub= le ... --=20 You are receiving this mail because: You are on the CC list for the bug.