diff options
-rw-r--r-- | gold/ChangeLog | 6 | ||||
-rw-r--r-- | gold/dwarf_reader.cc | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 64f7b78..5180c02 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2021-01-28 H.J. Lu <hongjiu.lu@intel.com> + + PR gold/27246 + * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog): + Skip address size and segment selector for DWARF5. + 2021-01-19 Alan Modra <amodra@gmail.com> PR 27203 diff --git a/gold/dwarf_reader.cc b/gold/dwarf_reader.cc index 4873769..f0e6b89 100644 --- a/gold/dwarf_reader.cc +++ b/gold/dwarf_reader.cc @@ -1658,6 +1658,10 @@ Sized_dwarf_line_info<size, big_endian>::read_header_prolog( header_.version = elfcpp::Swap_unaligned<16, big_endian>::readval(lineptr); lineptr += 2; + // Skip address size and segment selector for DWARF5. + if (header_.version >= 5) + lineptr += 2; + if (header_.offset_size == 4) header_.prologue_length = elfcpp::Swap_unaligned<32, big_endian>::readval(lineptr); else |