Skip to content

diffoscope should compare ELF sections as binary before doing very expensive dump / comparisons

Consider a pair of typical unstripped vmlinux with a small difference in .rodata (for example) and no change in size of any section.

diffoscope can take many minutes dumping and comparing DWARF dumps etc., even though those sections are identical.

It's much faster for me to run cmp -l, to work out the relevant sections by eye and do this manually:

for s in .notes .rodata .init.data; do
  diff -U500 <(objdump --disassemble -j "$s" compare/given/vmlinux) <(objdump --disassemble -j "$s" compare/built/vmlinux)
done

I think diffoscope should compare ELF sections as binary data (as a gating check) before doing very expensive dump / comparisons.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information