From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview]
Message-ID: <bug-24345-11298@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=24345
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 using
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:
...
<24> DW_AT_encoding : 5 (signed)
...
but .rela.debug_info is not.
So, dwz breaks the validity of .rela.debug_info.
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2019-03-14 17:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 0:00 vries at gcc dot gnu.org [this message]
2019-01-01 0:00 ` [Bug default/24345] " vries at gcc dot gnu.org
2019-01-01 0:00 ` vries at gcc dot gnu.org
2020-09-13 14:50 ` mark at klomp dot org
2021-02-12 14:31 ` mark at klomp dot org
2021-02-12 14:35 ` mark at klomp dot org
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=bug-24345-11298@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=dwz@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).