This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc4.4.1 related doubt

Hi Jie,

Thanks for your response.

I have downloaded cross toolchain from codesourcercy site.(Download
Sourcery G++ Lite 2009q3-67 )

arm-2009q3/bin/arm-none-linux-gnueabi-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with:
--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='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}
%{O2:%{!fno-remove-local-statics: -fremove-local-statics}}
-fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared
--disable-lto --enable-symvers=gnu --enable-__cxa_atexit
--with-pkgversion='Sourcery G++ Lite 2009q3-67'
--disable-nls --prefix=/opt/codesourcery
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic
-lm' --with-cloog=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr
--disable-libgomp --enable-poison-system-directories
Thread model: posix
gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67)

I have Build 2.6.30 kernel for ARM
and i am attaching my file for your reference.

also i am able to reproduce attached result when i build my attach
program using below options.

arm-linux-gnueabi-gcc -fno-optimize-sibling-calls -O2 test.c
I can see Function name ?Convert to
0000842c t T.12

But If i give O0 Flag when Building then
0000834c t $d
00008470 t ABC
000084a8 t BCD

I want to Build my kernel with O2 flag. Will you please provide some
flag except 'O0' which disable this optimization.

I have not check o/p of binary with gdb. Is GDB will have any issue
with this type of optimization ?

On Fri, Mar 26, 2010 at 12:18 PM, Jie Zhang <> wrote:
> On 03/26/2010 01:13 AM, Ian Lance Taylor wrote:
>> trisha yad<> ?writes:
>>> I am attaching one sample program.
>>> 1. arm-linux-gnueabi-gcc -fno-optimize-sibling-calls -O0 test.c
>>> 2. arm-linux-gnueabi-gcc -fno-optimize-sibling-calls -O2 test.c
>>> arm-linux-gnueabi-nm of O0 is log1
>>> arm-linux-gnueabi-nm of O2 is log
>>> I am attaching o/p of command using option --save-temps i.e in file
>>> test.s
>>> arm-linux-gnueabi-gcc -fno-optimize-sibling-calls --save-temps -O2 test.c
>> I don't understand how the .c file you showed can produce the .s file
>> that you showed. ?In the .c file, main calls ABC. ?In the .s file, it
>> does not. ?I don't see how the optimizer could remove that call.
> I cannot reproduce this issue from the attached source file either.
>> I do see the T.12 symbol in the assembler source. ?However, I don't
>> know where it came from. ?I don't see when I compile your C file with
>> a recent ARM gcc.
> It might come from compiler instantiating a function, i.e. T.12 is a clone
> of a function but with some parameters instantiated. Just my guess.
>> Can you explain why the T.12 symbol is a problem?
> I think it should not be a problem. T.12 is a local symbol, it can be
> stripped by strip with appropriate options.
> --
> Jie Zhang
> CodeSourcery
> (650) 331-3385 x735

Description: GNU Zip compressed data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]