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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Lance Taylor wrote:
"Jeffi Edward.J" <j.jeffi@xxxxxxxxxxx> 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.
Another route could be the 'powerpc-elf' target which seems to be more generic. Reading docs like
the ones at :

ftp://sources.redhat.com/pub/binutils/ppc-docs/

could tell what one would want. I would think the '-elf' being in sync with the base SVR4/PPC definitions
and the '-eabi' being a variation of this base definition....

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux