Comment # 6 on bug 1204697 from
(In reply to Egbert Eich from comment #5)
> Ok, before we close this one, let's find an answer to this question:
> 
> Why are object files built with -flto=auto not reproducible?

Because the LTO bytecode lives in ELF sections that have a random identifier in
them:

marxin@marxinbox:~/Programming/testcases> echo '' > x.c && gcc -flto x.c -c &&
readelf -SW x.o | grep ipa_mod
  [ 6] .gnu.lto_.ipa_modref.6b4b5ae4355029d0 PROGBITS        0000000000000000
000062 000011 00   E  0   0  1
marxin@marxinbox:~/Programming/testcases> echo '' > x.c && gcc -flto x.c -c &&
readelf -SW x.o | grep ipa_mod
  [ 6] .gnu.lto_.ipa_modref.5d692f1a75e917f0 PROGBITS        0000000000000000
000062 000011 00   E  0   0  1
marxin@marxinbox:~/Programming/testcases> echo '' > x.c && gcc -flto x.c -c &&
readelf -SW x.o | grep ipa_mod
  [ 6] .gnu.lto_.ipa_modref.3690319a2a14ea9b PROGBITS        0000000000000000
000062 000011 00   E  0   0  1
marxin@marxinbox:~/Programming/testcases> echo '' > x.c && gcc -flto x.c -c &&
readelf -SW x.o | grep ipa_mod
  [ 6] .gnu.lto_.ipa_modref.77a516ac55937be3 PROGBITS        0000000000000000
000062 000011 00   E  0   0  1

It's because we want to prevent collisions where these object files are seen by
a linker.


You are receiving this mail because: