Bug#843210: binutils-multiarch: ar and ranlib generates undeterministic symbol table ar entries
Guillem Jover
guillem at debian.org
Sat Nov 5 12:37:08 UTC 2016
Control: reassign -1 binutils-multiarch
Control: retitle -1 binutils-multiarch: ar and ranlib generates undeterministic symbol table ar entries
Hi!
It seems the culprit is binutils-multiarch, binutils works just fine.
On Sat, 2016-11-05 at 05:00:19 +0100, Guillem Jover wrote:
> Package: binutils
> Version: 2.27.51.20161102-1
> Severity: important
> X-Debbugs-CC: reproducible-builds at lists.alioth.debian.org
> The ar and ranlib tools generate a symbol table ar entry that is not
> deterministic, which means that any package now in Debian generating
> static libraries will become unreproducible. Here's a transcript of
> a test session:
>
> ,---
> $ cat aa.c
> int aa(void) { return 10; }
> $ cat bb.c
> int bb(void) { return 20; }
> $ gcc -c -o aa.o aa.c
> $ gcc -c -o bb.o bb.c
> $ ar qSf libtest.a aa.o bb.o
> ar: creating libtest.a
> $ md5sum libtest.a
> 289a09b22693865dbc80d4a2cc7b379e libtest.a
> $ rm libtest.a
> $ ar qSf libtest.a aa.o bb.o
> ar: creating libtest.a
> $ md5sum libtest.a
> 289a09b22693865dbc80d4a2cc7b379e libtest.a
> $ ar qf libtest.a aa.o bb.o
> ar: creating libtest.a
> $ md5sum libtest.a
> b9f2b4db76231467df2362d87041fef9 libtest.a
> $ ranlib libtest.a
> $ md5sum libtest.a
> 3831575adad5003dfc6cac1a0ec8c8aa libtest.a
> $ ranlib -D libtest.a
> $ md5sum libtest.a
> 23859367b1463bf35d7ab6a0a37eda4b libtest.a
> `---
>
> The ar headers of that last archive are:
>
> ,---
> $ sfile libtest.a
> file name : libtest.a
> file type : archiver
> file size : 2668
> file offset : 0 (0)
> main header type : Unix/BSD archiver
> ar header signature : !<arch>
> file offset : 0x8 (8)
> sub header type : Unix/BSD archive file entry
> file name : /SYM64/
> file date : 1478318043 (Sat Nov 5 04:54:03 2016)
> file uid : 0
> file gid : 0
> file mode : 0
> file size : 32
> file signature : 0x600a
> file offset : 0x64 (100)
> sub header type : Unix/BSD archive file entry
> file name : aa.o/
> file date : 0 (Thu Jan 1 01:00:00 1970)
> file uid : 0
> file gid : 0
> file mode : 644
> file size : 1224
> file signature : 0x600a
> file offset : 0x568 (1384)
> sub header type : Unix/BSD archive file entry
> file name : bb.o/
> file date : 0 (Thu Jan 1 01:00:00 1970)
> file uid : 0
> file gid : 0
> file mode : 644
> file size : 1224
> file signature : 0x600a
> `---
Thanks,
Guillem
More information about the Reproducible-builds
mailing list