Skip to content

Commit 74c1e3d

Browse files
committed
DWARF-5: Fix parsing DWARF-5 line number tables
Advance rngs_ptr when parsing DW_RLE_offset_pair, which was missing in commit c3757b5 Author: Mark Wielaard <[email protected]> Date: Tue Aug 25 15:33:00 2020 +0100 Fix the linker's handling of DWARF-5 line number tables. PR binutils/27231 * dwarf2.c (read_rnglists): Advance rngs_ptr after _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair. (cherry picked from commit 18454c1)
1 parent b985209 commit 74c1e3d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
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-23 H.J. Lu <[email protected]>
2+
3+
PR binutils/27231
4+
* dwarf2.c (read_rnglists): Advance rngs_ptr after
5+
_bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.
6+
17
2021-01-20 Alan Modra <[email protected]>
28

39
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume

bfd/dwarf2.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,9 +3265,11 @@ read_rnglists (struct comp_unit *unit, struct arange *arange,
32653265
low_pc = base_address;
32663266
low_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
32673267
FALSE, rngs_end);
3268+
rngs_ptr += bytes_read;
32683269
high_pc = base_address;
32693270
high_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
32703271
FALSE, rngs_end);
3272+
rngs_ptr += bytes_read;
32713273
break;
32723274

32733275
case DW_RLE_start_end:

0 commit comments

Comments
 (0)