c++ ABI

来源:互联网 发布:windows一键还原 编辑:程序博客网 时间:2024/06/03 18:54

http://gcc.gnu.org/gcc-3.2/c++-abi.html

http://developers.sun.com/solaris/articles/CC_abi/CC_abi_content.html

 

Introduction

The Application Binary Interface (ABI) of a programming-language implementationis a specification of all the low-level details that allow separately-compiledmodules to work together. Without a stable ABI, all parts of a program mustbe compiled with the same version of the same compiler. That situation createsa maintenance nightmare for distributed projects, and particularly for suppliersof binary libraries. The early rapid evolution of the C++ programming languageprecluded a stable ABI. The advent of the C++ international standard in 1998[ISO/IEC 14882:1998 Programming Languages - C++] providesa base for a stable C++ ABI, at least for a given C++ implementation. In thispaper we explore the stability question for Sun C++ compilers for the Solarisoperating environment.

 

ABI是一个编程语言实现的低层细节的规格,以便独立编译的模块间能够协同工作。如果各个编译器或者同一个编译器的不同版本之间没有一个统一稳定的ABI,则一个程序要能正常工作,它的所有部分都必须使用同一个版本的编译器进行编译。

 

The C ABI

The Solaris ABI is also the C ABI, because C is the standard Uniximplementation language. Among other things, the C ABI specifies:

  • size and layout of predefined types (char, int, float, etc.)
  • layout of compound types (arrays and structs)
  • external (linker-visible) spelling of programmer-defined names
  • machine-code function-calling sequence
  • stack layout
  • register usage.

c语言的ABI包含如下规格:

  • c语言预定义类型(char,int等)的size和layout;
  • 复杂类型(数组和结构)的layout;
  • 自定义名字的外部形式;
  • 。。。
原创粉丝点击