Architecture-ABI: Difference between revisions

From Yocto Project
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:


Additional references, CPU optimization compatibility and suggested canonical architecture namings may be provided.
Additional references, CPU optimization compatibility and suggested canonical architecture namings may be provided.
== ABI Summary ==
The following is a list of ABIs that are in common usage.  Some of the ABIs discussed in the following sections will not appear in this table if they are legacy.
{| border="1"
|'''Arch'''||'''ABI'''||'''Endian'''||'''Compatibility'''
|-
|ARM||EABI||Big Endian||
|-
|ARM||EABI||Little Endian||
|}


== ARM ==
== ARM ==
Line 15: Line 27:
It has two variants, an emulated hardware floating point, and a soft floating point variant.  The legacy ABI should no longer be used in embedded projects and has more or less disappeared.  The legacy ABI is not compatible with the EABI.
It has two variants, an emulated hardware floating point, and a soft floating point variant.  The legacy ABI should no longer be used in embedded projects and has more or less disappeared.  The legacy ABI is not compatible with the EABI.


It can be detected by:
You can detect the ABI if the result of objdump -x contains [APCS-32]
 
From: http://wiki.debian.org/ArmEabiPort
 
objdump -x contains [APCS-32]


The legacy abi can be enabled by using "-mabi=apcs-gnu"
The legacy abi can be enabled by using "-mabi=apcs-gnu"
Line 25: Line 33:
----
----


EABI - The new "Embedded" ABI by ARM ltd.
EABI - The new "Embedded" ABI by ARM ltd.  This is otherwise known as "the ABI for the ARM Architecture".


The new EABI specifies a single ABI that works in various hardware floating point and software floating point configurations as well as Thumb interworking.  Overall structure packing is better, a more efficient syscall convention is provided.
The new EABI specifies a single ABI that works in various hardware floating point and software floating point configurations as well as Thumb interworking.  Overall structure packing is better, a more efficient syscall convention is provided.
You can detect the ABI if the result of objdump -x contains [Version4 EABI]


=== Processor Variants ===
=== Processor Variants ===
The gnu-canonical architecture for arm is in the format:
  armv<version><capabilities>-os-linux-gnu-eabi
The gnu-eabi indicates that it is the newer EABI ABI.
The ARM core versions include:
* armv4
* armv5
* armv6
* armv7
The ARM processor capabilities indicate:
* el - little endian (optional)
* eb - big endian
* t - thumb/thumb2
* j - java
This would result in something similar to:  armv7teb, for an ARM 7 core, with thumb capabilities, running in big endian mode.
In addition processors may include specific optimizations that change which CPUs a compiled program will run on, these include:
* VFP instructions
* NEON
* Thumb/Thumb-2 instructions


== IA32 ==
== IA32 ==

Latest revision as of 19:42, 4 November 2010

Introduction

There are currently many official and unofficial ABI -- Application Binary Interfaces -- in use within embedded Linux projects. The following is an attempt to lightly document what the individual architecture ABI consist of, without going into too many details..

Many of the following ABIs have grown organically based on specific processor designs and optimization levels. For the most part the processor optimizations are ignored in these descriptions, unless otherwise mentioned.

Additional references, CPU optimization compatibility and suggested canonical architecture namings may be provided.

ABI Summary

The following is a list of ABIs that are in common usage. Some of the ABIs discussed in the following sections will not appear in this table if they are legacy.

Arch ABI Endian Compatibility
ARM EABI Big Endian
ARM EABI Little Endian

ARM

ABI

apcs-gnu a.k.a. OABI - The original ARM ABI.

It has two variants, an emulated hardware floating point, and a soft floating point variant. The legacy ABI should no longer be used in embedded projects and has more or less disappeared. The legacy ABI is not compatible with the EABI.

You can detect the ABI if the result of objdump -x contains [APCS-32]

The legacy abi can be enabled by using "-mabi=apcs-gnu"


EABI - The new "Embedded" ABI by ARM ltd. This is otherwise known as "the ABI for the ARM Architecture".

The new EABI specifies a single ABI that works in various hardware floating point and software floating point configurations as well as Thumb interworking. Overall structure packing is better, a more efficient syscall convention is provided.

You can detect the ABI if the result of objdump -x contains [Version4 EABI]

Processor Variants

The gnu-canonical architecture for arm is in the format:

  armv<version><capabilities>-os-linux-gnu-eabi

The gnu-eabi indicates that it is the newer EABI ABI.

The ARM core versions include:

  • armv4
  • armv5
  • armv6
  • armv7

The ARM processor capabilities indicate:

  • el - little endian (optional)
  • eb - big endian
  • t - thumb/thumb2
  • j - java

This would result in something similar to: armv7teb, for an ARM 7 core, with thumb capabilities, running in big endian mode.

In addition processors may include specific optimizations that change which CPUs a compiled program will run on, these include:

  • VFP instructions
  • NEON
  • Thumb/Thumb-2 instructions

IA32

MIPS

Power