免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1669 | 回复: 0
打印 上一主题 下一主题

[转载]ABI/EABI/OABI [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-18 14:33 |只看该作者 |倒序浏览
ABI/EABI/OABI
http://wiki.debian.org/ArmEabiPort
ArmEabiPort

(..............................)
Terminology
Strictly
speaking, both the old and new ARM ABIs are subsets of the ARM EABI
specification, but in everyday usage the term "EABI" is used to mean
the new one described here and "OABI" or "old-ABI" to mean the old one. However, there are one or two programs that sometimes describe an old ABI binary as "EABI".
To add to the confusion, powerpc has also had an ABI called "EABI" for some, which has nothing to do with this one.
(..............................)
GCC view
New ABI is not only a new ABI field, it is also a new GCC target.
Legacy ABI
* ABI flags passed to binutils: -mabi=apcs-gnu -mfpu=fpa
* gcc -dumpmachine: arm-unknown-linux
* objdump -x for compiled binary:
private flags = 2: [APCS-32] [FPA float format] [has entry point]* "file" on compiled Debian binary:
ELF
32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.2.0,
dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped* "readelf -h | grep Flags""
Flags: 0x0
Arm EABI:
* ABI flags passed by gcc to binutils: -mabi=aapcs-linux -mfloat-abi=soft -meabi=4
* gcc -dumpmachine: arm-unknown-linux-gnueabi
* objdump -x for compiled binary:
private flags = 4000002: [Version4 EABI] [has entry point]* "file" on compiled binary (under Debian):
ELF
32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.4.17,
dynamically linked (uses shared libs), for GNU/Linux 2.4.17, stripped* "readelf -h | grep Flags""
Flags: 0x4000002, has entry point, Version4 EABI
Furthermore, as well as the usual __arm__ and maybe also __thumb__ symbols, the C preprocessor symbol __ARM_EABI__ is also defined when compiling into EABI.
(..............................)
Struct packing and alignment
With the new ABI, default structure packing changes,
as do some default data sizes and alignment (which also have a knock-on
effect on structure packing). In particular the minimum size and
alignment of a structure was 4 bytes. Under the EABI there is no minimum and the alignment is determined by the types of the components it contains.
This will break programs that know too much about the way structures
are packed and can break code that writes binary files by dumping and
reading structures.
(..............................)
http://en.wikipedia.org/wiki/Application_binary_interface
Application binary interface (ABI)

application binary interface (ABI) describes
the low-level interface between an application program and the
operating system, or the interface between an application and its
libraries, or that between component parts of an application. An ABI is
similar to an application programming interface (API); however, the
latter defines a source code interface.[1] Simply put, ABIs enable
binary compatibility, whereas APIs enable source code compatibility.
For
example, the POSIX standard defines an API that allows a wide range of
common computing functions to be written such that they may operate on
many different systems (Mac OS X, various BSDs and Microsoft Windows
all implement this interface); however, making use of this requires
re-compilation for each platform. A compatible ABI, on the other
hand, allows compiled object code to function without any changes, on
any system implementing that ABI.
This is advantageous to both
software providers (where they may distribute existing software on new
systems without producing/distributing upgrades) and users (where they
may install older software on their new systems without purchasing
upgrades), although this generally requires various software libraries
implementing the necessary APIs too.
ABIs cover details such as
the calling convention, which controls how functions' arguments are
passed and return values retrieved; the system call numbers and how an
application should make system calls to the operating system; and in
the case of a complete operating system ABI, the binary format of
object files, program libraries and so on. A complete ABI, such as the
Intel Binary Compatibility Standard (iBCS),[2] allows a program from
one operating system supporting that ABI to run without modifications
on any other such system. Other ABIs standardize details such as the
C++ name decoration,[3] exception propagation,[4] and calling
convention between compilers on the same platform, but do not require
cross-platform compatibility.
What is EABI and how do I use it?
http://www.applieddata.net/forums/topic.asp?TOPIC_ID=2305

What is EABI?
GNU
EABI is a new application binary interface (ABI) for Linux. It is part
of a new family of ABI's from ARM
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP