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]

RE: Intermixing powerpc-eabi and powerpc-linux C code

> -----Original Message-----
> From: [] On Behalf
> Ron McCall
> Sent: Thursday, June 01, 2006 2:33 PM
> To:
> Subject: Intermixing powerpc-eabi and powerpc-linux C code
> Hi!
> Does anyone happen to know if it is possible to link
> (and run) C code compiled with a powerpc-eabi targeted
> gcc with C code compiled with a powerpc-linux targeted
> gcc?  The resulting program would be run on a PowerPC
> Linux system (ELDK 4.0).

When I last played with the powerpc many years ago, the main differences
between Linux and eabi was some details that you may or may not run into
(note these are from memory, so you probably need to check what the
current reality is):
1) eabi had different stack alignments than Linux;
2) eabi uses 2 small data registers (r2, r13) and Linux only 1 (r13?).
3) There are eabi relocations not officially in Linux and vice versa,
but the GNU linker should support any relocations the compiler uses.
4) eabi can be little endian, Linux is only big endian.
5) different system libraries were linked in by default. 

Michael Meissner
AMD, MS 83-29
90 Central Street
Boxborough, MA 01719

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