diff options
| author | Mark Wielaard <[email protected]> | 2018-06-01 02:23:37 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2018-06-01 15:16:33 +0200 |
| commit | 0f5b772dec3f7c6fdd99739468706956b1bd04b9 (patch) | |
| tree | 79d37f3edcfb1abe118b409ceccb5eed0b0b861f /src/readelf.c | |
| parent | 00d89086c97a8782620da14ec2fab67d5bd57038 (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/readelf.c')
| -rw-r--r-- | src/readelf.c | 14 |
1 files changed, 11 insertions, 3 deletions
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 |
