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

Daniel Shahaf danielsh at apache.org
Mon Sep 19 07:05:13 UTC 2016


Package: diffoscope
Version: 60
Severity: wishlist

Dear Maintainer,

A difference in an ELF binary file can cause offsets throughout the
file to shift, usually by all of them by the same amount.

Typical example:

│   │   │   │   │  ./build/../src/nvim/indent_c.c:658
│   │   │   │   │ -   44436:	48 8d 35 01 77 1c 00 	lea    0x1c7701(%rip),%rsi        
│   │   │   │   │ +   44436:	48 8d 35 f8 76 1c 00 	lea    0x1c76f8(%rip),%rsi        
│   │   │   │   │  ./build/../src/nvim/main.c:749
│   │   │   │   │     46eea:	48 8b 3c 24          	mov    (%rsp),%rdi
│   │   │   │   │ -   46eee:	48 8d 35 7f 50 1c 00 	lea    0x1c507f(%rip),%rsi        
│   │   │   │   │ +   46eee:	48 8d 35 76 50 1c 00 	lea    0x1c5076(%rip),%rsi

Here, 0x1c7701-0x1c76f8 = 0x1c507f-0x1c5076 = 9.  There are several
screenfuls of such differences, which reduces the signal-to-noise ratio
of the output, since all of these differences are secondary; the primary
difference is whatever caused the 9 bytes shift in the first place.

(On this instance, the 9 bytes offset was caused by a string literal
being present in the first build but not in the second build.)

Could these offset differences in readelf(1) output be ignored, at least
optionally?  This would make it easier to find the root cause by reading
the diff.

Cheers,

Daniel



More information about the Reproducible-builds mailing list