Skip to content

Commit 5876ea3

Browse files
committed
DWARF-5: Ignore empty range in DWARF-5 line number tables
The DWARF5 spec does indeed explicitly say: "A bounded range entry whose beginning and ending address offsets are equal (including zero) indicates an empty range and may be ignored." Since arange_add already ignores empty ranges, remove the whole check which is equivalent to the check plus explicit continue. PR binutils/27231 * dwarf2.c (read_rnglists): Ignore empty range when parsing line number tables. (cherry picked from commit 940d020)
1 parent 8b236df commit 5876ea3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bfd/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
2+
3+
PR binutils/27231
4+
* dwarf2.c (read_rnglists): Ignore empty range when parsing line
5+
number tables.
6+
17
2021-01-24 Nick Clifton <nickc@redhat.com>
28

39
* version.m4: Set to 2.36.0.

bfd/dwarf2.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,9 +3289,6 @@ read_rnglists (struct comp_unit *unit, struct arange *arange,
32893289
return FALSE;
32903290
}
32913291

3292-
if ((low_pc == 0 && high_pc == 0) || low_pc == high_pc)
3293-
return FALSE;
3294-
32953292
if (!arange_add (unit, arange, low_pc, high_pc))
32963293
return FALSE;
32973294
}

0 commit comments

Comments
 (0)