[diffoscope] Bug#838260: diffoscope: Reduce noise from offsets deltas in readelf(1) diffs

Daniel Shahaf danielsh at apache.org
Tue Sep 20 20:47:31 CEST 2016

Jérémy Bobbio wrote on Tue, Sep 20, 2016 at 13:18:49 +0000:
> But why stop with images? In the precise case of the readelf output,
> having line-oriented diff means we are carrying around a useless and
> confusing information: the line numbers are not helpful in anyway to
> locate and undrstand the differences.
> But what if we could replace the line numbers by the instruction
> addresses? Then the noise mentioned by Daniel disappears. Meanwhile, the
> actual output will become even more relevant.

In the example in the OP, the (source code) line numbers and instruction
addresses are the same between both builds.  It is the .rodata addresses
embeddded into the instructions that differ.

However, in the .text section, each disassembled instruction is preceded
by its address.  I think it would make sense to have the diff ignore
those addresses: they serve a purpose similar to line numbers, and
ignoring them cannot cause a difference to be missed.



More information about the diffoscope mailing list