Eliminating __eabi() call from main in powerpc-eabi-gcc cross compiler

Ian Lance Taylor iant@google.com
Tue Jan 19 15:50:00 GMT 2010


"Jeffi Edward.J" <j.jeffi@yahoo.co.in> writes:

> My powerpc-eabi-gcc generates __eabi() call in main. As far as I know
> __eabi() sets up r13 register to .sdata base address and r2 register to 
> .sdata2 base address. __eabi() calls __init() which invokes all global and
> static c++ constructors. In my application setting up r13 and r2 registers
> to .sdata, .sdata2 has been written in assembly code before invoking main()
> itself. So I would like to avoid compiler generated __eabi() call in main.
> In the mean while I have to invoke __init() separately too.
>
> In GCC manual I saw -mno-eabi compiler option avoids generating __eabi()
> call. Even after using this option, my main() generates __eabi() call. Its
> also mentioned in GCC manual that __eabi() call is default for powerpc-eabi
> targets. Does this mean -mno-eabi will not have effect for powerpc-eabi
> targets? How to avoid __eabi() call in main?

I don't think there is an option for this.  You will have to modify
the compiler if you want to disable the __eabi call.

Ian



More information about the Gcc-help mailing list