Skip to content
Snippets Groups Projects
Commit 1bc0a672 authored by Laura Abbott's avatar Laura Abbott
Browse files

linux-ramdump-parser-v2: Skip bad rodata headers

When checking for rodata differences, we scan the ELF headers of
the vmlinux. Newer vmlinux files seem to have extra ELF headers
with addresses outside the valid mapped range. If we encounter
one of those headers and read an invalid address, skip it.

Change-Id: I2a8af784df7216bf9d890be42eec8599fbaa7f72
parent 9e570006
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,8 @@ class ROData(RamParser): ...@@ -57,6 +57,8 @@ class ROData(RamParser):
fd.seek(prgheader.offset + (count - prgheader.vaddr)) fd.seek(prgheader.offset + (count - prgheader.vaddr))
ram_value = self.ramdump.read_word(count) ram_value = self.ramdump.read_word(count)
vm_value = struct.unpack('I', fd.read(4))[0] vm_value = struct.unpack('I', fd.read(4))[0]
if ram_value is None:
break
if detect == 0 and vm_value != ram_value: if detect == 0 and vm_value != ram_value:
print_out_str( print_out_str(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment