diff options
author | Nick Clifton <nickc@redhat.com> | 2023-04-19 11:48:24 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-04-19 11:48:24 +0100 |
commit | 28ab94f51dcdee056d96e57ad04c27c22cf854ea (patch) | |
tree | 19131b005ebbe4be02293b279c00c449623cfb51 /binutils/dwarf.c | |
parent | ac164fa8540426238670184e0007e1d4261eaec8 (diff) | |
download | binutils-28ab94f51dcdee056d96e57ad04c27c22cf854ea.zip binutils-28ab94f51dcdee056d96e57ad04c27c22cf854ea.tar.gz binutils-28ab94f51dcdee056d96e57ad04c27c22cf854ea.tar.bz2 |
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/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 86893c5..1001a11 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); } |