On 7 October 2013 11:30, Matthew Gretton-Dann matthew.gretton-dann@linaro.org wrote:
On 7 October 2013 05:20, Keith Packard keithp@keithp.com wrote:
[...]
- The thumb version of libgcc.a is not built with thumb instructions because GCC doesn't pass -mthumb to the assembler when it receives -mthumb on the command line.
I would be expecting the compiler to pass .thumb in the assembler source to as.
My experience with arm/thumb assembler are similar. With my Ubuntu stock 4.8 configured as
Using built-in specs. COLLECT_GCC=arm-linux-gnueabihf-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1-7ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabihf/include/c++/4.8.1 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf-cross --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include Thread model: posix gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-7ubuntu1)
I get the following unexpected results:
$ arm-linux-gnueabihf-gcc -mthumb -c -o /dev/null -xassembler - <<<"adrl r0,." $ arm-linux-gnueabihf-gcc -mthumb -c -o /dev/null -xassembler - <<<".thumb; adrl r0,." {standard input}: Assembler messages: {standard input}:1: Error: selected processor does not support Thumb mode `adrl r0,.'
i.e., the former passes while I would expect the assembler to be kicked into thumb mode by the compiler.