Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] Pull network and Patch Acceptance Consistency

Mauro Carvalho Chehab
2019-06-14T02:22:04Z

Em Thu, 13 Jun 2019 12:20:00 -0700
Joe Perches <joe@perches.com> escreveu:

> On Thu, 2019-06-13 at 16:11 -0300, Mauro Carvalho Chehab wrote:
> > Yeah, a tool or a CI bot test with would help to identify binary-identical
> > changes would be really helpful, as this could help a lot maintainers to
> > decide either to take or not cleanup patches (including those coccinelle
> > stuff) without requiring hardware testing.
>
> An unfortunate aspect of GCC with any kind of tool
> is that binary identical compilation objects are
> not guaranteed with identical input source files.

A quick look at:

https://stackoverflow.com/questions/46801881/why-does-gcc-produce-different-compiled-binaries-for-programs-that-use-different

seems to indicate that using objdump -s would produce identical
results. I did a quick test here with gcc 9. It didn't work.

However, using objdump -S worked:

$ rm ./drivers/scsi/isci/port.o; make M=drivers/scsi/; objdump -S ./drivers/scsi/isci/port.o >./drivers/scsi/isci/port-v1.a; \
rm ./drivers/scsi/isci/port.o; make M=drivers/scsi/; objdump -S ./drivers/scsi/isci/port.o >./drivers/scsi/isci/port-v2.a; \
diff -u ./drivers/scsi/isci/port-v1.a ./drivers/scsi/isci/port-v2.a

CC drivers/scsi//isci/port.o
AR drivers/scsi//isci/built-in.a
AR drivers/scsi//built-in.a
Building modules, stage 2.
MODPOST 5 modules
CC drivers/scsi//isci/port.o
AR drivers/scsi//isci/built-in.a
AR drivers/scsi//built-in.a
Building modules, stage 2.
MODPOST 5 modules

<no diffs>

Thanks,
Mauro