什么是ARM ABI和EABI的目的是什么? [英] What are the purposes of the ARM ABI and EABI?

查看:337
本文介绍了什么是ARM ABI和EABI的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我越是看这 PDF 不太了解我这意味着什么。

The more i look at this PDF the less i understand what it means.

此外,我想这个人 1 一些意见和 2

Also i'd like some comments on this others 1 and 2

我希望有人可以帮助。

推荐答案

这是ABI( 应用程序二进制接口 的)是一种标准,定义了低层次的概念之间的映射在高级语言和特定的硬件/ OS平台的机器code的能力。这包括喜欢的东西:

An ABI (Application Binary Interface) is a standard that defines a mapping between low-level concepts in high-level languages and the abilities of a specific hardware/OS platform's machine code. That includes things like:


  • 如何C / C ++ / Fortran语言/ ... 数据类型在内存中的布局(数据大小/对齐)

  • 嵌套的函数如何调用工作(其中,并就如何返回到函数的调用者的信息如何存储,其中的CPU寄存器和/或记忆功能参数传递)

  • 如何程序启动/初始化作品(什么数据格式可执行有,怎么code /数据是从那里加载的DLL是如何工作的?)

  • how C/C++/Fortran/... data types are laid out in memory (data sizes / alignments)
  • how nested function calls work (where and how the information on how to return to a function's caller is stored, where in the CPU registers and/or in memory function arguments are passed)
  • how program startup / initialization works (what data format an "executable" has, how the code / data is loaded from there, how DLLs work ...)

这些的答案是:


  • 特定语言的(因此你已经有了一个C ABI,C ++ ABI,ABI的Fortran,帕斯卡尔ABI,......甚至Java字节code规格,虽然针对虚拟处理器,而不是真正的硬件,是一种ABI)

  • 操作系统特定的(MS Windows和Linux在同一硬件上使用不同的ABI)

  • 硬件/ CPU专用的(对ARM和x86的ABI是不同的)。

  • 在不断变化(长)时间的(现有的ABI经常被更新/ rev'ed让新的CPU功能可以利用的一样,比方说,指定的x86 SSE寄存器是如何来通过应用程序可以使用,当然是唯一可能的CPU一次的中有的这些暂存器,因此需要现有的ABI澄清)。

  • language-specific (hence you've got a C ABI, C++ ABI, Fortran ABI, Pascal ABI, ... even the Java bytecode spec, although targeting a "virtual" processor instead of real hardware, is an ABI),
  • operating-system specific (MS Windows and Linux on the same hardware use a different ABI),
  • hardware/CPU-specific (the ARM and x86 ABIs are different).
  • evolving over (long) time (existing ABIs have often been updated / rev'ed so that new CPU features could be made use of, like, say, specifying how the x86 SSE registers are to be used by apps was of course only possible once CPUs had these regs, therefore existing ABIs needed to be clarified).

如果没有某种形式的这种标准化的,(机)code不能使用同一种库(你怎么知道以何种方式库code预计,函数参数或数据结构要传递?)。

Without some kind of this standardization, (machine) code created by different compilers couldn't use the same kind of libraries (how would you know in which way the library code expects function arguments or data structures to be passed ?).

每个平台的(特定的硬件,操作系统软件和code写的具体编译器编译特定的编程语言/组合)的定义了一整套的ABI的把事情的互操作性。在这方面的术语不明确,有时人们只谈论ABI的,其他时候它被称为平台补充,或者一个提到的编程语言和如说到C ++ ABI。请记住,没有一个这样的东西。

Every platform (a combination of specific hardware, operating system software and code written in specific programming languages / compiled with specific compilers) defines a whole set of ABIs to make things interoperable. The terminology in this area isn't clear, sometimes people just talk about "the ABI", other times it's called the "platform supplement", or one mentions the programming language and says e.g. "the C++ ABI". Keep in mind, there is not one such thing.

你在你的问题联系到这些文件是这个(语言 - /操作系统/硬件特定的ABI)。

The documents that you linked to in your question are all specific examples of this (language- / operating-system / hardware-specific ABIs).

即使在特定平台上,有没有必要拥有的且只有一个的ABI(套),因为不同的这些公约可能有不同的优势(并因此提供更好的性能/小code /更好的内存使用情况/ ... - 这取决于程序),系统设计人员通常会尽量灵活/允许结果
在32位的Microsoft Windows,例如,有的ABI的众多(FASTCALL,STDCALL,帕斯卡,...)的函数调用约定的部分。

Even on a specific platform, there's no necessity to have one and only one ABI (set) because different such conventions might have different advantages (and therefore provide better performance / smaller code / better memory usage / ... - depending on the program) and system designers usually try to be flexible / permissible.
On 32bit Microsoft Windows, for example, there's a multitude of ABIs (fastcall, stdcall, pascal, ...) for the function calling convention parts.

不管怎样,通用计算器搜索ABI(包括相关侧栏下的链接)给出了这么多的线索来研究这个问题,我收我的答案在这一点上。

Anyway, a generic stackoverflow search for "ABI" (included the links under the "Related" sidebar) gives so many leads to researching this question that I close my answer at this point.

这篇关于什么是ARM ABI和EABI的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆