Hi, I am trying add usb gadget mass storage to uboot , and got run-time abortion on usbmsd.c with the default u-boot Os option. I use linaro 2011.03 4.5.3 version, and my trials as following: 1) During debugging , I found the abort exception in usbmsd_init_strings(). if declaring it with noinline function, like static void usbmsd_init_strings (void) __attribute__((noinline)); it works, however, next steps still failed. 2) compling uboot with O0, everyhing is ok. 3) try other toolchain. It works with codesourcery's 2011.03-41 and ubuntu 4.5 version, while failed with 2011.04 4.5 linaro version. 4) I have dumped the obj files, seeming some funcs optimized , analysing the details is out of my knowledge, :( . please check the attached three files.
toolchain: ypluo@ypluo-dt:~/work/Current/L38EVB/Main/out/prima2cb$ arm-none-linux-gnueabi-gcc --v Using built-in specs. COLLECT_GCC=arm-none-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/home/ypluo/work/Current/Tools/toolchain/linaro-201103-csr-build-armv7-vfpv3_x86_32/bin/../libexec/gcc/arm-none-linux-gnueabi/4.5.3/lto-wrapper Target: arm-none-linux-gnueabi Configured with: /media/8ccb10fd-862c-47d2-99fb-144e7188e1fb/home/vmuser/development/toolchain/build-toolchain/gcc-linaro-4.5-2011.03-0/configure --target=arm-none-linux-gnueabi --prefix=/media/8ccb10fd-862c-47d2-99fb-144e7188e1fb/home/vmuser/development/toolchain/build-toolchain/tools --enable-languages=c,c++ --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --enable-shared --enable-multiarch --enable-threads=posix --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --disable-werror --with-pkgversion='Ubuntu/Linaro 4.5-2011.3-csr-build' --enable-poison-system-directories Thread model: posix gcc version 4.5.3 20110221 (prerelease) (Ubuntu/Linaro 4.5-2011.3-csr-build)
ypluo@ypluo-dt:~/work/Current/L38EVB/Main/out/prima2cb$ /home/ypluo/mywork/toolchain/arm-2011.03/bin/arm-none-linux-gnueabi-gcc --v Using built-in specs. COLLECT_GCC=/home/ypluo/mywork/toolchain/arm-2011.03/bin/arm-none-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/mywork/toolchain/arm-2011.03/bin/../libexec/gcc/arm-none-linux-gnueabi/4.5.2/lto-wrapper Target: arm-none-linux-gnueabi Configured with: /scratch/janisjo/arm-linux-lite/src/gcc-4.5-2011.03/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} -D__CS_SOURCERYGXX_MAJ__=2011 -D__CS_SOURCERYGXX_MIN__=3 -D__CS_SOURCERYGXX_REV__=41 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2011.03-41' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpc=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-libelf=/scratch/janisjo/arm-linux-lite/obj/host-libs-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/janisjo/arm-linux-lite/install/arm-none-linux-gnueabi/bin Thread model: posix gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41)
Please let me know if other info needed. Many thanks.
Yuping
I stripped two attachments as these were too large; these are at: http://people.linaro.org/~lool/usbmsd.objdump-SourceryG++Lite-2011.03-41 http://people.linaro.org/~lool/usbmsd.objdump-linaro-2011.03
Cheers
linaro-toolchain@lists.linaro.org