From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22043 invoked by alias); 14 Mar 2019 17:44:28 -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 21996 invoked by uid 48); 14 Mar 2019 17:44:25 -0000 From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/24345] New: Dwz invalidates debug sections generated by --emit-relocs 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-q1/txt/msg00122.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24345 Bug ID: 24345 Summary: Dwz invalidates debug sections generated by --emit-relocs 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: --- When compiling hello world, we can keep the relocations in the executable u= sing linker option --emit-relocs: ... $ gcc hello.c -g -Wl,--emit-relocs ... So we have: ... [35] .debug_info PROGBITS 0000000000000000 000011a0 00000000000005bb 0000000000000000 0 0 1 [36] .rela.debug_info RELA 0000000000000000 00003138 0000000000000c78 0000000000000018 I 44 35 8 ... Using readelf, we find f.i. this string relocation: ... $ readelf -r -w a.out Relocation section '.rela.debug_info' at offset 0x3138 contains 133 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000000024 00200000000a R_X86_64_32 0000000000000000 .debug_str + = 1a ... for this location: ... <24> DW_AT_comp_dir : (indirect string, offset: 0x1a): /home/abuild/rpmbuild/BUILD/glibc-2.26/csu ... However, if we run dwz, then .debug_info is modified:=20 ... <24> DW_AT_encoding : 5 (signed) ... but .rela.debug_info is not. So, dwz breaks the validity of .rela.debug_info. --=20 You are receiving this mail because: You are on the CC list for the bug.