EABI
Is it possible to compile a Linux application using an EABI compiler (specfically, Xilinx's EDK powerpc-eabi-gcc.exe)? The issue at hand is that we'd like for our customers to be able to use the Xilinx EDK toolchain (which we know they will have) to compile Linx apps without having to install another toolchain (crosstool, ELDK, etc). So, what I'm hoping is that the EDK toolchain can be configured to be Linux compatible binaries, or that there is some kind of wrapper that will handle the incompatible interfaces. Searching around, I've seen some mention of Linux EABI compatibility (for Debian ARM releases), but I haven't found any clear concensus... P.S. My apologies if this message appears on the mailing list twice... -- Brian Silverman Concept X, LLC ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
EABI
Is it possible to compile a Linux application using an EABI compiler (specfically, Xilinx's EDK powerpc-eabi-gcc.exe)? The issue at hand is that we'd like for our customers to be able to use the Xilinx EDK toolchain (which we know they will have) to compile Linx apps without having to install another toolchain (crosstool, ELDK, etc). So, what I'm hoping is that the EDK toolchain can be configured to be Linux compatible binaries, or that there is some kind of wrapper that will handle the incompatible interfaces. Searching around, I've seen some mention of Linux EABI compatibility (for Debian ARM releases), but I haven't found any clear concensus... Brian Silverman Principal Engineer iVeia ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Re: EABI
On Apr 24, 2008, at 11:13 AM, Brian Silverman wrote: Is it possible to compile a Linux application using an EABI compiler (specfically, Xilinx's EDK powerpc-eabi-gcc.exe)? The issue at hand is that we'd like for our customers to be able to use the Xilinx EDK toolchain (which we know they will have) to compile Linx apps without having to install another toolchain (crosstool, ELDK, etc). So, what I'm hoping is that the EDK toolchain can be configured to be Linux compatible binaries, or that there is some kind of wrapper that will handle the incompatible interfaces. Searching around, I've seen some mention of Linux EABI compatibility (for Debian ARM releases), but I haven't found any clear concensus... P.S. My apologies if this message appears on the mailing list twice... The EABI and Linux ABI are not compatible and if you want to link with any libraries you will need a different compiler for linux. - k ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Re: EABI
On Thu, Apr 24, 2008 at 10:13 AM, Brian Silverman <[EMAIL PROTECTED]> wrote: > > > Is it possible to compile a Linux application using an EABI compiler > (specfically, Xilinx's EDK powerpc-eabi-gcc.exe)? > > The issue at hand is that we'd like for our customers to be able to use the > Xilinx EDK toolchain (which we know they will have) to compile Linx apps > without having to install another toolchain (crosstool, ELDK, etc). > > So, what I'm hoping is that the EDK toolchain can be configured to be Linux > compatible binaries, or that there is some kind of wrapper that will handle > the incompatible interfaces. Searching around, I've seen some mention of > Linux EABI compatibility (for Debian ARM releases), but I haven't found any > clear concensus... > > P.S. My apologies if this message appears on the mailing list twice... Unfortunately, no. I recommend making use of the ELDK toolchain from Denx. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Re: EABI
Unfortunately, it is not that easy. The Xilinx tool chain use newlib but your Linux kernel (and rootfs) is probably built around glibc. When we've wanted to do a quick-and-dirty test of something that relies on Xilinx's patches to gcc, we have used powerpc-eabi-gcc to compile to assembler and then used our own crosstools compilers to link and load. That doesn't solve your problem but hopefully it explains the issue. Ron > Is it possible to compile a Linux application using an EABI compiler > (specfically, Xilinx's EDK powerpc-eabi-gcc.exe)? > > The issue at hand is that we'd like for our customers to be able to use > the Xilinx EDK toolchain (which we know they will have) to compile Linx > apps without having to install another toolchain (crosstool, ELDK, etc). > > So, what I'm hoping is that the EDK toolchain can be configured to be > Linux compatible binaries, or that there is some kind of wrapper that > will handle the incompatible interfaces. Searching around, I've seen > some mention of Linux EABI compatibility (for Debian ARM releases), but > I haven't found any clear concensus... > > P.S. My apologies if this message appears on the mailing list twice... > > -- > Brian Silverman > Concept X, LLC ___ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
About eabi and stack
I got confused by the EABI stack usage. Help needed. Thanks in advance. What I did is: * Wrote a dummy c function and got its asm codes like below with objdump utility. * From EABI convention, I can understand that testStack function first move its stack pointer %r1 16 words down and meantime save the old stack position onto the lowest address. However, I can't understand where it puts the lr(link register). I can't understand the "stw r0, 20(r1)" instruction. I THOUGHT, we **only** moved the stack pointer **-16** down. How can we save the lr value with "20(r1)"?? Hua - void testStack(){ testFunction(); } - : 2b8: 94 21 ff f0 stwur1,-16(r1) 2bc: 7c 08 02 a6 mflrr0 2c0: 93 e1 00 0c stw r31,12(r1) *** 2c4: 90 01 00 14 stw r0,20(r1) Where 20(r1) will point to?? *** 2c8: 7c 3f 0b 78 mr r31,r1 2cc: 48 00 00 01 bl 2cc /* Below is to restrore stack and lr*/ 2d0: 81 61 00 00 lwz r11,0(r1) 2d4: 80 0b 00 04 lwz r0,4(r11) 2d8: 7c 08 03 a6 mtlrr0 2dc: 83 eb ff fc lwz r31,-4(r11) 2e0: 7d 61 5b 78 mr r1,r11 2e4: 4e 80 00 20 blr ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
About eabi and stack
On Fri, 9 Feb 2001, Hua Ji wrote: > Date: Fri, 9 Feb 2001 15:08:05 -0800 > From: Hua Ji > To: linuxppc-embedded at lists.linuxppc.org > Subject: About eabi and stack > > > I got confused by the EABI stack usage. Help needed. Thanks in advance. > > What I did is: > > * Wrote a dummy c function and got its asm codes like below with objdump > utility. > * From EABI convention, I can understand that testStack function first > move its stack pointer %r1 16 words down and meantime save the old > stack position onto the lowest address. However, I can't understand > where it puts the lr(link register). I can't understand the "stw r0, > 20(r1)" instruction. I THOUGHT, we **only** moved the stack pointer > **-16** down. How can we save the lr value with "20(r1)"?? > > Hua > > - > > void testStack(){ > > > testFunction(); > } > > - > : > > 2b8: 94 21 ff f0 stwur1,-16(r1) > 2bc: 7c 08 02 a6 mflrr0 > 2c0: 93 e1 00 0c stw r31,12(r1) > *** > 2c4: 90 01 00 14 stw r0,20(r1) Where 20(r1) will point > to?? > *** According to the EABI standard, LR will be saved in the caller's stack frame (that is the function which calls testStack()). Before entry to testStack() SP points to the top of testStack() caller. Suppose that this addr is A. After execution of stwu, SP will point to A-16 (4 words "above" [lower addr] the caller's stack frame). The stw at 2c4 will store the LR to A + 20 - 16 (= A+4) which is one word below the top of the caller's stack frame. > 2c8: 7c 3f 0b 78 mr r31,r1 > 2cc: 48 00 00 01 bl 2cc > > /* Below is to restrore stack and lr*/ > 2d0: 81 61 00 00 lwz r11,0(r1) > 2d4: 80 0b 00 04 lwz r0,4(r11) > 2d8: 7c 08 03 a6 mtlrr0 > 2dc: 83 eb ff fc lwz r31,-4(r11) > 2e0: 7d 61 5b 78 mr r1,r11 > 2e4: 4e 80 00 20 blr > > -- Hans Dulimarta, Ph.D. |dulimart at computer.org Research Associate| http://www.egr.msu.edu/~dulimart P: 517-432-7589 | http://corelinux.sourceforge.net F: 760-281-7691 http://freshmeat.net/projects/snapsource Elec. & Comp. Engg., Mich. State Univ., E. Lansing, MI 48824 ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
building glibc eabi vs. elf
Hello all. I am running into problems building glibc 2.2.5 using my powerpc-eabi-gcc compiler. I had no problems using this compiler to build newlib, ppcboot, and the linux kernel. I am getting the feeling, though, that I should be using powerpc-elf-gcc instead. I believe my current build error is because in sysdep.h __ELF__ is not defined and therefore some macros don't get defined either. Is this sounding familiar to anyone? Here's the output of "make": make -r PARALLELMFLAGS="" CVSOPTS="" -C ../../src/glibc-2.2.5 objdir=`pwd` all make[1]: Entering directory `/usr/src/glibc-2.2.5' make -C csu subdir_lib make[2]: Entering directory `/usr/src/glibc-2.2.5/csu' powerpc-eabi-linux-gnu-gcc -B/usr/local/powerpc-eabi/bin/ ../sysdeps/powerpc/elf/start.S -c -I../include -I. -I/usr/build/glibc-2.2.5/csu -I.. -I../libio -I/usr/build/glibc-2.2.5 -I../sysdeps/powerpc/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/powerpc -I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/powerpc/fpu -I../sysdeps/powerpc -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/powerpc/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /usr/local/powerpc-eabi/lib/gcc-lib/powerpc-eabi/3.0.4/include -isystem d:/src/linux-2.4.18/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -DASSEMBLER -I/usr/build/glibc-2.2.5/csu/. -Wa,-mppc -o /usr/build/glibc-2.2.5/csu/start.o ../sysdeps/powerpc/elf/start.S: Assembler messages: ../sysdeps/powerpc/elf/start.S:28: Error: Unrecognized opcode: `l(start_addresses):' ../sysdeps/powerpc/elf/start.S:30: Warning: rest of line ignored; first ignored character is `(' ../sysdeps/powerpc/elf/start.S:31: Warning: rest of line ignored; first ignored character is `(' ../sysdeps/powerpc/elf/start.S:32: Warning: rest of line ignored; first ignored character is `(' ../sysdeps/powerpc/elf/start.S:33: Error: Unrecognized opcode: `asm_size_directive(L(start_addresses))' ../sysdeps/powerpc/elf/start.S:36: Error: Unrecognized opcode: `entry(_start)' ../sysdeps/powerpc/elf/start.S:47: Error: syntax error; found `(' but expected `,' ../sysdeps/powerpc/elf/start.S:47: Error: junk at end of line: `(start_addresses)@ha' ../sysdeps/powerpc/elf/start.S:48: Error: junk at end of line: [EMAIL PROTECTED](8)' ../sysdeps/powerpc/elf/start.S:50: Error: syntax error; found `(' but expected `,' ../sysdeps/powerpc/elf/start.S:50: Error: junk at end of line: `(__libc_start_main)' make[2]: *** [/usr/build/glibc-2.2.5/csu/start.o] Error 1 make[2]: Leaving directory `/usr/src/glibc-2.2.5/csu' make[1]: *** [csu/subdir_lib] Error 2 make[1]: Leaving directory `/usr/src/glibc-2.2.5' make: *** [all] Error 2 Any helpful tips would be appreciated. Pete P.S. My powerpc-eabi-ld can create an ELF image. ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
va-ppc.h and powerpc-eabi-gcc
Hi, folks, I got in trouble with the "printf"... * The cross-compiled I built is: powerpc-eabi-gcc. * When I compile/build my codes, I also forced the compiler to use EABI by "-meabi" usage. * With "-v", I did see the default predefined Macro of "__PPC__" and "CALLSYSV". With those two macros, my codes will link the "va-ppc.h"(Please see the stdarg.h). The result is: my printf can't work properly when with complex input parameters. Would you guys give me some help if you happen to know this area? Thanks a million, Mike, ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
target=powerpc-linux, powerpc-eabi, powerpc-elf
What is the difference between the 3 (?) types og targets for powerpc? ELF = Extended Linker Format EABI = Embedded Application Binary Interface Linux = ? Is it 3 different layouts for the binary file? The machine-type in GCC is stated as: i386-redhat-linux powerpc-elf powerpc-unknown-linux powerpc-unknown-linux-gnu What does these parts define (*-*-* = processor-binaryformat-system, or?) ? Which target will you suggest using when working with a MPC823 using PPCBoot ? We want to build our own kernel for the MPC823 - can we use Newlib for that? - from the documentation to Newlib it seems as if there is missing some hardware-specific parts in newlib which is needed by Linux...? We will only be running normal/simple apps with the kernel and don't need some "almost-never-user" functions from the libary. If we can use newlib (hope so since it is smaller) - should we compile the cross-gcc with the option --with-newlib ? Maybe stupid questions (hope not) Thanks in avance! Regards, David Marqvar ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
target=powerpc-linux, powerpc-eabi, powerpc-elf
"David Marqvar (DAM)" wrote: > > What is the difference between the 3 (?) types og targets for powerpc? > ELF = Extended Linker Format > EABI = Embedded Application Binary Interface > Linux = ? ELF is the type used by Linux. Linux is not a binary type. > Is it 3 different layouts for the binary file? > > The machine-type in GCC is stated as: > i386-redhat-linux > powerpc-elf > powerpc-unknown-linux > powerpc-unknown-linux-gnu > > What does these parts define (*-*-* = processor-binaryformat-system, or?) ? The canonical name (what you call the machine-type) is in the format of "architecture"-"vendor"-"operating system". linux and linux-gnu are the same thing (they fill out the third operating system field.) > Which target will you suggest using when working with a MPC823 using PPCBoot > ? Whatever PPCBoot uses > We want to build our own kernel for the MPC823 - can we use Newlib for that? > - from the documentation to Newlib it seems as if there is missing some > hardware-specific parts in newlib which is needed by Linux...? > We will only be running normal/simple apps with the kernel and don't need > some "almost-never-user" functions from the libary. Newlib can not be used to create applications for PowerPC Linux. However it can be used to "bootstrap" the compiler if you only require the ability to compile a kernel. The correct canonical name when building the compiler are "power-unknown-linux" (you can add in the -gnu if you want...) > If we can use newlib (hope so since it is smaller) - should we compile the > cross-gcc with the option --with-newlib ? To build a compiler only capable of building a kernel you can use --with-newlib and this removes the requirement to have a valid glibc. Just keep in mind this compiler can build glibc, but can not build user apps. BTW Why are you building your own gcc compilers? There are many free and commerical resources for compilers that are tailored towards MPC 823 work. --Mark ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/