与 ABI 调用约定和架构混淆
我对所有这些术语感到困惑:
ABI、调用约定和硬件架构。
ABI 与架构相关:x86-64 的 ABI 与 i386 不同。 但是您也可以定义自己的调用约定 cdecl...
那么所有这些概念之间的联系是什么? 哪一个定义另一个?
我主要认为我对 ABI 感到困惑。您在调用约定的一部分中放入了什么?
谢谢
I am getting confuse with all those terms:
ABI, calling convention, and hardware architecture.
The ABI is link with the architecture: x86-64 have a different ABI than the i386.
But then you can also define your own calling convention cdecl...
Well so what is the link between all those concept?
Which one is defining the other one?
Mostly I think I am confuse with ABI. What do you put inside a part from calling convention?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个很大的主题,仍然可以为您提供一些指导:
ABI(应用程序二进制接口)涵盖了需要指定的细节,以便应用程序可以在特定系统(通常使用操作系统)上运行。因此,举个例子:
基本上需要的任何细节为了构建与其他一些组件(库、操作系统)一起运行的程序而已知的知识可以包含在 ABI 中。有些 ABI 指定更多细节,有些指定较少细节。
硬件架构也可以被视为一种规范,但级别更低(它是关于硬件而不是软件)。硬件架构指定了可用指令集、内存层次结构以及如何访问外设等内容。对于一种硬件架构,可以有不同的 ABI。此外,您还可以对多个(但通常相似)硬件架构使用相同的 ABI。
This is a vast topic still to give you some pointers:
The ABI (application binary interface) cover the details that need to be specified in order that application can work on a certain system (usually with an operating system). So, to get to examples:
Basically any detail that needs to be known in order to build a program that runs together with some other components (libraries, OS) can be included in an ABI. Some ABI specify more and some specify less details.
The hardware architecture can be also seen as a specification but of even lower level (it's about hardware not software). The hardware architecture specifies things like the instruction set available, memory hierarchy and how to access peripherals. For one hardware architecture there can be different ABI-s. Also you can have the same ABI for multiple (but usually similar) hardware architecture.