Chris Lamb wrote on Tue, Sep 20, 2016 at 10:26:18 +0100:
> > > Perhaps there is a perfect solution whereby we would normalise these two
> > > offsets to — making it up here! — relative values, but simply need […]
> >
> > I'm not sure I understand what your idea is.  Could you give an example
> > of how the output might look?
> Apologies for not explaining myself better - I don't actually have a
> concrete idea for the output, but I was just expressing a wish to avoid
> a flag to ignore certain things so was using a hypothetical solution.

Perhaps the output could replace all offsets into the .rodata section by
sequential numbers?  For example, if the .rodata section starts at 0xA00
and ends at 0xC00, and the output references 0xA80, 0xA70, 0xB80,
and 0xB70, then those could be translated to .rodata#2, .rodata#1,
.rodata#4, and .rodata#3 respectively.  To make this lossless, the
(.rodata#42 ↦ 0xB53) mapping could be appended to the file and included
in the diff.

Example output:

    lea    «.rodata#1»(%rip),%rsi
    <at the end>
    .rodata#1 is 0xA70
    .rodata#2 is 0xA80

The actual hex values could be displayed as a tooltip on the 'lea' line,
or appended to that line as a '# comment' that will be considered equal
by the unidiff (like 'diff -w' considers space and tab equal).



> We already have a few and I wish they would/could disappear! :)
> Regards,
> -- 
>       ,''`.
>      : :'  :     Chris Lamb
>      `. `'` /
>        `-

Reply via email to