Fix reading of .debug_line on MIPS64, big-endian:
read_initial_length detects pointer size by checking first 4 bytes of .debug_line and stores it in struct comp_unit_head * passed to it as second argument. By passing NULL to a read_initial_length we ignore actual pointer size (8 bytes) and use default (4 bytes) which results in wrong offsets of header fields.
This commit is contained in:
parent
306cc0acfb
commit
6c412cffd0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214651
@ -5178,7 +5178,7 @@ dwarf_decode_line_header (unsigned int offset, bfd *abfd,
|
||||
line_ptr = dwarf_line_buffer + offset;
|
||||
|
||||
/* read in the header */
|
||||
lh->total_length = read_initial_length (abfd, line_ptr, NULL, &bytes_read);
|
||||
lh->total_length = read_initial_length (abfd, line_ptr, &cu->header, &bytes_read);
|
||||
line_ptr += bytes_read;
|
||||
if (line_ptr + lh->total_length > dwarf_line_buffer + dwarf_line_size)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user