This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
non-deterministic as
- From: chenyang <chenyang dot cq at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 21 May 2009 21:06:33 +0800
- Subject: non-deterministic as
Hi everyone,
I found a very strange problem of "as" when I was building gcc-4.3.3.
I got a "Bootstrap comparison failure!", when means that some .o files
were not identical between stage2 and stage3. However, it turns out that
the problem was introduced by "as" not gcc itself. For some .s files, as
will produce a different .o file each time it is invoked with the same .s file:
> as -V -Qy -o obj1.o testtree.s
GNU assembler version 2.19 (x86_64-unknown-linux-gnu) using BFD
version (GNU Binutils) 2.19
> as -V -Qy -o obj2.o testtree.s
GNU assembler version 2.19 (x86_64-unknown-linux-gnu) using BFD
version (GNU Binutils) 2.19
> ll obj*.o
-rw-r--r-- 1 tester users 87360 2009-05-21 20:37 obj1.o
-rw-r--r-- 1 tester users 87360 2009-05-21 20:37 obj2.o
> cmp -i 16 obj1.o obj2.o
obj1.o obj2.o differ: byte 66006, line 132
My system is:
-Linux gnode2 2.6.5-7.97-smp #1 SMP Fri Jul 2 14:21:59 UTC 2004
x86_64 x86_64 x86_64 GNU/Linux
-SUSE LINUX Enterprise Server 9 (x86_64)
I have transferred the testtree.s file to another AMD machine, and saw
no problem there.
I have also copied the static linked binutils binaries on that "no
problem" machine to use
on the "problem" machine. And the problem didn't go away. In a word,
the same static
linked "as" runs deterministically on one machine,
non-deterministically (produce different
.o files) on another.
So I guess that It's a system-specific problem. What problem could it
be? Any ideas?
Thanks, in advance.