From b9c5c7f2a7b82dae504c0ffc9a00d82162ec4ba2 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 23 Jan 2021 20:09:38 -0800 Subject: [PATCH] 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 should be equivalent to the check plus explicit continue. PR binutils/27231 * dwarf2.c (read_rnglists): Ignore empty range when parsing line number tables. --- bfd/dwarf2.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 292d60c33d4..240138d5982 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -3289,9 +3289,6 @@ read_rnglists (struct comp_unit *unit, struct arange *arange, return FALSE; } - if ((low_pc == 0 && high_pc == 0) || low_pc == high_pc) - return FALSE; - if (!arange_add (unit, arange, low_pc, high_pc)) return FALSE; } -- 2.29.2