r245741 (clang as cc) can not build binaries for GEODE processor
Lev Serebryakov
lev at FreeBSD.org
Fri Feb 22 20:31:58 UTC 2013
Hello, Lev.
You wrote 23 февраля 2013 г., 0:14:45:
LS> Hello, Dimitry.
LS> You wrote 22 февраля 2013 г., 20:14:50:
DA>> As Joerg Sonnenberger mentioned to me, the address 0x10351d6 you show in
DA>> the gdb session seems to be quite high, possibly pointing to some shared
DA>> library. Maybe you can try to figure out which library it is?
LS> Here is two long NOPs in output of clang in -CURRENT without "-march"
LS> options:
LS> objdump -d test
LS> 080483a0 <_start1>:
LS> ...
LS> 80483e8: 40 inc %eax
LS> 80483e9: 0f 1f 80 00 00 00 00 nopl 0x0(%eax)
LS> 80483f0: 8a 08 mov (%eax),%cl
LS> ...
LS> 8048496: 31 ff xor %edi,%edi
LS> 8048498: 0f 1f 84 00 00 00 00 nopl 0x0(%eax,%eax,1)
LS> 804849f: 00
LS> 80484a0: 8b 04 bd 68 96 04 08 mov 0x8049668(,%edi,4),%eax
And sample code is EXACTLY THE SAME with "-march=geode" and crashes the
same!
I'm puzzled, why system binaries works in such case!?
But disassembly of system binaries (for example, /usr/bin/who)
doesn't contains "nopl" at all!
I've attached disassembly of "start1" form:
(a) unstripped "who" command built in "make buildworld" stage with
CPUTYPE=geode set.
(b) unstripped "Hello world" program, built with simple "cc -o test \
test.c" (contains "nopl")
(c) unstripped "Hello world" program, built with simple "cc \
-march=geode -o test.geode test.c" (contains "nopl" too!)
Oh, I see... "start1" is linked from startup code like crt0.o, am I
right?
So, rebuilding only ports with "CPUTYPE=geode" will not help!
But, in any case, it seems to be bug in clang to generate such
instructions in "default" case.
--
// Black Lion AKA Lev Serebryakov <lev at FreeBSD.org>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.geode.s
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130223/2cc2cca9/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.s
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130223/2cc2cca9/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: who.s
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130223/2cc2cca9/attachment-0002.ksh>
More information about the freebsd-current
mailing list