summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2023-04-19 11:48:24 +0100
committerNick Clifton <nickc@redhat.com>2023-04-19 11:48:24 +0100
commit28ab94f51dcdee056d96e57ad04c27c22cf854ea (patch)
tree19131b005ebbe4be02293b279c00c449623cfb51 /binutils
parentac164fa8540426238670184e0007e1d4261eaec8 (diff)
downloadbinutils-gdb-28ab94f51dcdee056d96e57ad04c27c22cf854ea.tar.gz
Fix: readelf: loc_offset XX too big
PR 30355 * dwarf.c (read_and_display_attr_value): Correctly handle DW_loclistx attributes that index a version 5 .debug_loclists section.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog9
-rw-r--r--binutils/dwarf.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f705b6c4622..22ca79cfb96 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,8 +1,15 @@
+2023-04-19 Nick Clifton <nickc@redhat.com>
+
+ PR 30355
+ * dwarf.c (read_and_display_attr_value): Correctly handle
+ DW_loclistx attributes that index a version 5 .debug_loclists
+ section.
+
2023-04-17 Nick Clifton <nickc@redhat.com>
PR 30142
* rescoff.c (write_coff_file): Add the SEC_READONLY flag to the
- .rsrc section.
+ .rsrc section.
2023-04-11 Nick Clifton <nickc@redhat.com>
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 86893c59dc7..1001a11db40 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2725,7 +2725,7 @@ read_and_display_attr_value (unsigned long attribute,
if (idx != (uint64_t) -1)
idx += (offset_size == 8) ? 20 : 12;
}
- else if (debug_info_p == NULL)
+ else if (debug_info_p == NULL || dwarf_version > 4)
{
idx = fetch_indexed_value (uvalue, loclists, 0);
}