On 03/26/2010 01:13 AM, Ian Lance Taylor wrote:
> trisha yad<trisha1march@xxxxxxxxx> 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