ysk-san KT

技術系の情報をKTするために、まずは勉強

ABI(Application Binary Interface)ってなんですか?/ What is a ABI(Application Binary Interface)?

(English below)

ABI(Application Binary Interface)は、コンピューターシステム内でアプリケーションソフトウェアがバイナリ形式で互換性を維持するためのインターフェース規格です。ABIは、アプリケーションがオペレーティングシステムやハードウェアと対話し、プログラムが実行される際のバイナリデータのフォーマット、関数呼び出し規約、システムコール、およびその他の低レベルの詳細な部分に関する規則を定義します。異なるプラットフォーム間での互換性を提供し、異なるプログラムが共に動作できるようにするために重要です。

異なる種類のABIが存在し、プラットフォームやアーキテクチャに応じて異なります。以下に、いくつかの具体的なABIの種類を紹介しましょう。

 

x86 ABI:
x86アーキテクチャは、主にPCおよびサーバーコンピューターで使用されるもので、WindowsLinuxなどのオペレーティングシステム上で動作します。x86 ABIは、レジスタの使用、パラメータの渡し方、システムコールの方法などを定義しています。例えば、Windows上でのx86 ABIはWin32 ABIとして知られています。

x86-64 ABI:
x86-64アーキテクチャ(またはAMD64とも呼ばれます)は、64ビットのバージョンのx86アーキテクチャで、多くのモダンなデスクトップおよびサーバーシステムで使用されています。x86-64 ABIは、64ビット環境でのレジスタの使用、パラメータの渡し方、システムコールなどを定義します。Linuxではx86-64 ABIが一般的です。

ARM ABI:
ARMアーキテクチャは、モバイルデバイスや組み込みシステムで広く使用されています。ARM ABIは、ARMプロセッサ向けのバイナリ互換性を提供します。例えば、AndroidバイスはARM ABIに基づいており、アプリケーションはARMプロセッサで動作するためにARM ABIに従う必要があります。

SPARC ABI:
SPARC(Scalable Processor Architecture)は、OracleSun Microsystemsによって開発されたRISCアーキテクチャです。SPARC ABIは、SPARCプロセッサ向けに設計され、Solarisなどのオペレーティングシステムで使用されます。

MIPS ABI:
MIPS(Microprocessor without Interlocked Pipeline Stages)は、組み込みシステムやネットワーク機器などで使用されるアーキテクチャです。MIPS ABIは、MIPSプロセッサ向けに設計されており、Linuxなどで使用されます。

 

これらのABIは、各プラットフォームとアーキテクチャでバイナリ互換性を維持するために必要です。プログラマーコンパイラは、特定のABIに従ってコードを書き、コンパイルする必要があります。ABIの違いを無視すると、アプリケーションは正しく動作せず、クラッシュや予測できない動作が発生する可能性があります。

 

====English translation====

The Application Binary Interface (ABI) is an interface standard for maintaining compatibility of application software in binary form within a computer system, It defines rules for the format of binary data, function calling conventions, system calls, and other low-level details when programs are executed. It is important to provide compatibility between different platforms so that different programs can work together.

Different types of ABIs exist and vary based on platform and architecture. Some specific types of ABIs are listed below.

 


x86 ABI:.
The x86 architecture is primarily used in PC and server computers and runs on operating systems such as Windows and Linux. x86 ABI defines how registers are used, how parameters are passed, and how system calls are made. For example, the x86 ABI on Windows is known as the Win32 ABI.

x86-64 ABI:.
The x86-64 architecture (also known as AMD64) is a 64-bit version of the x86 architecture used in many modern desktop and server systems. x86-64 ABI defines how to use registers, pass parameters, make system calls, etc. in a 64-bit environment, The x86-64 ABI is commonly used in Linux.

ARM ABI:.
The ARM architecture is widely used in mobile devices and embedded systems. For example, Android devices are based on the ARM ABI and applications must follow the ARM ABI to run on ARM processors.

SPARC ABI:.
SPARC (Scalable Processor Architecture) is a RISC architecture developed by Sun Microsystems for Oracle. SPARC ABI is designed for the SPARC processor and is used in Solaris and other operating systems such as Solaris.

MIPS ABI:.
MIPS (Microprocessor without Interlocked Pipeline Stages) is an architecture used in embedded systems and networking equipment. These ABIs are designed for each platform.

 


These ABIs are required to maintain binary compatibility on each platform and architecture. Programmers and compilers must write and compile code according to specific ABIs; ignoring differences in ABIs can result in applications that do not run properly and may cause crashes or unpredictable behavior.