aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-01-24 07:00:34 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-01-24 07:07:26 -0800
commit1ae65e19b214068e0fd3389f755d5a4ffffaca83 (patch)
tree018acb0cc6d2f9d284b5ca281da2e8d97add93b8
parentDWARF-5: Fix parsing DWARF-5 line number tables (diff)
downloadbinutils-gdb-1ae65e19b214068e0fd3389f755d5a4ffffaca83.tar.gz
binutils-gdb-1ae65e19b214068e0fd3389f755d5a4ffffaca83.tar.bz2
binutils-gdb-1ae65e19b214068e0fd3389f755d5a4ffffaca83.zip
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 940d0202fd472b09d370fb483bf5a8ae99c9c830)
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/dwarf2.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 32deed3fbb..6a2e70291d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/27231
+ * dwarf2.c (read_rnglists): Ignore empty range when parsing line
+ number tables.
+
2021-01-23 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/27231
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 1682be5a22..767e973119 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -3276,9 +3276,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;
}