arm-unknown-linux-gnueabi ABI selection
Yann E. MORIN
yann.morin.1998@anciens.enib.fr
Sun Aug 31 17:01:00 GMT 2008
On Sunday 31 August 2008 17:49:30 Michael Abbott wrote:
>
> On Sun, 31 Aug 2008, Michael Abbott wrote:
> > > 2. I can't build a good toolchain (sizeof(enum)==1 is a disaster).
> > I may have spotted a discrepancy, with CT_ARCH_ABI_CFLAGS where it looks
> > as if CT_ARCH_ABI_CFLAG was meant.
> ...
> > I'll make an update in an hour when the build is complete.
> And ... it still doesn't work.
OK, working on Marc's idea, I managed to have a 'working' EABI toolchain:
# cat test.c
enum test { TEST };
int size() { return sizeof(enum test); }
# ./arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -O2 -S test.c
# cat test.s
.arch armv5te
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 18, 4
.file "test.c"
.text
.align 2
.global size
.type size, %function
size:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
mov r0, #4
bx lr
.size size, .-size
.ident "GCC: (crosstool-NG-1.2.0+svn_trunk@970M) 4.3.1"
.section .note.GNU-stack,"",%progbits
# ./arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -O2 \
-c test.c -o test.o
# ./arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-readelf -h test.o
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: ARM
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 236 (bytes into file)
Flags: 0x4000000, Version4 EABI
Size of this header: 52 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 40 (bytes)
Number of section headers: 10
Section header string table index: 7
Seems in the case of EABI, we must entirely leave out the --with-abi and -mabi
flags, as Marc said. So, is the above an EABI-compliant toolchain?
Michael, care to test further the attached patch? If that's OK, then I'll
remove the ABI config option in case EABI is selected.
BTW, Michael, I saw you were using gcc-4.2.4. I'm using 4.3.1, and got the
same results as yours without the patch. I did not test the patch with 4.2.4.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ^ |
| --==< ^_^ >==-- `------------.-------: X AGAINST | /e\ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | """ conspiracy. |
`------------------------------^-------^------------------^--------------------'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ct-ng.ARM-EABI.patch
Type: text/x-diff
Size: 1142 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20080831/10797fe9/attachment.bin>
-------------- next part --------------
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list