summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2018-06-01 02:23:37 +0200
committerMark Wielaard <[email protected]>2018-06-01 15:16:33 +0200
commit0f5b772dec3f7c6fdd99739468706956b1bd04b9 (patch)
tree79d37f3edcfb1abe118b409ceccb5eed0b0b861f /src
parent00d89086c97a8782620da14ec2fab67d5bd57038 (diff)
readelf: Deal with combined normal and split dwarf DebugFission .debug_loc.
Normal and split dwarf from GNU DebugFission look the same, but should be treated competely separtely. When having a file with both skeletons and real compile units only note the secoffsets into the real .debug_loc in readelf. Otherwise or known_locslistptr will get confused. Add a testfile that combines an normal -gdwarf-4 object with a -gsplit-dwarf object. libdw already got this right, but add a run-varlocs.sh test to make sure. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/readelf.c14
2 files changed, 16 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0e6f1f27..3cd7ae7b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-31 Mark Wielaard <[email protected]>
+
+ * readelf.c (attr_callback): Only register section_loc when not
+ looking at a split dwarf from a skeleton.
+
2018-05-30 Mark Wielaard <[email protected]>
* readelf.c (print_debug_loc_section): Use correct listptr for
diff --git a/src/readelf.c b/src/readelf.c
index db7723d3..45401b30 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -7077,9 +7077,17 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
{
bool nlpt;
if (cbargs->cu->version < 5)
- nlpt = notice_listptr (section_loc, &known_locsptr,
- cbargs->addrsize, cbargs->offset_size,
- cbargs->cu, num, attr);
+ {
+ if (! cbargs->is_split)
+ {
+ nlpt = notice_listptr (section_loc, &known_locsptr,
+ cbargs->addrsize,
+ cbargs->offset_size,
+ cbargs->cu, num, attr);
+ }
+ else
+ nlpt = true;
+ }
else
{
/* Only register for a real section offset. Otherwise