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. Cheers, Daniel

