This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[arm] -mthumb option broken in gcc3.2.3.
- From: Karel Gardas <kgardas at objectsecurity dot com>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 30 Jun 2003 13:25:39 +0200 (CEST)
- Subject: [arm] -mthumb option broken in gcc3.2.3.
Hello,
maybe it's just user error (in this case please don't shout me :-), but
while playing with cross-compiling MICO on i686 to arm target, I've found
that -mthumb option generates wrong assembler output. Compilation fails
with:
arm-unknown-linux-gnu-c++ -I../include -Wall -Os -mthumb -fpermissive
-DPIC -fPIC -c os-unix.cc -o os-unix.pic.o
/tmp/ccqyg0wj.s: Assembler messages:
/tmp/ccqyg0wj.s:1582: Error: garbage following instruction -- `b _ZN4MICO11UnixProcessD1Ev(PLT)'
/tmp/ccqyg0wj.s:1723: Error: garbage following instruction -- `b _ZN4MICO11UnixProcessD0Ev(PLT)'
/tmp/ccqyg0wj.s:2142: Error: garbage following instruction -- `b _ZN4MICO11UnixProcess8callbackEPN5CORBA10DispatcherENS2_5EventE(PLT)'
The problematic assembler lines look:
1580 _ZThn4_N4MICO11UnixProcessD1Ev:
1581 sub r0, r0, #4
1582 b _ZN4MICO11UnixProcessD1Ev(PLT)
1583 .Lfe8:
1721 _ZThn4_N4MICO11UnixProcessD0Ev:
1722 sub r0, r0, #4
1723 b _ZN4MICO11UnixProcessD0Ev(PLT)
1724 .Lfe10:
2140 _ZThn4_N4MICO11UnixProcess8callbackEPN5CORBA10DispatcherENS2_5EventE:
2141 sub r0, r0, #4
2142 b _ZN4MICO11UnixProcess8callbackEPN5CORBA10DispatcherENS2_5EventE(PLT)
2143 .Lfe18:
when I remove -mthumb from the command line, everything compiles ok.
Any hint/ideas what should I do with it? (i.e. should I report full
bugreport or is it just already known bug?)
Thanks,
Karel
PS: gcc crosscompiler is gcc3.2.3 compiled by Dan Kegel's excelent
crosstool-0.10.0 on i686-pc-linux-gnu:
thinkpad:~/arch/devel/with-mico-opt/orb$ arm-unknown-linux-gnu-c++ -v
Reading specs from
/mnt/karel/arm/crosstool-0.10/result/arm-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/arm-unknown-linux-gnu/3.2.3/specs
Configured with:
/mnt/karel/arm/crosstool-0.10/build/arm-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/gcc-3.2.3/configure
--target=arm-unknown-linux-gnu --host=i686-host_pc-linux-gnu
--prefix=/mnt/karel/arm/crosstool-0.10/result/arm-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5
--enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit
--enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.2.3
thinkpad:~/arch/devel/with-mico-opt/orb$ arm-unknown-linux-gnu-as --version
GNU assembler 2.13.90.0.18 20030121
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `arm-unknown-linux-gnu'.
thinkpad:~/arch/devel/with-mico-opt/orb$
--
Karel Gardas kgardas@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com