For faster navigation, this Iframe is preloading the Wikiwand page for アプリケーションバイナリインタフェース.

アプリケーションバイナリインタフェース

アプリケーションバイナリインタフェースABI, : Application Binary Interface)とは、アプリケーション(ユーザ)プログラムとシステム(オペレーティングシステムライブラリ)との間の、バイナリレベルのインタフェースである。また、アプリケーション相互間や、それらの部品(プラグイン等)とのバイナリインタフェースもある。

ABIはアプリケーションプログラミングインタフェース (API) とは異なる。APIはソースコードとライブラリ間のインタフェースを定義したものであり、同じAPIをサポートしたシステム間では同じソースコードをコンパイルして利用できる。一方、ABIはオブジェクトコードレベルのインタフェースであり、互換ABIをサポートするシステム間では同じ実行ファイルを変更無しで動作させることができる。

概要

[編集]

ABIには、以下のような定義が含まれる。

Intel Binary Compatibility Standard (iBCS) のような完全なABIでは[1]、オペレーティングシステム (OS) が何であれ必要な共有ライブラリが存在するなどの前提条件が満たされていれば、そのABIをサポートしたシステム間でプログラム(実行ファイル)を全く修正せずに動作させることができる。

他のABIとして例えばC++名前修飾[2]例外の伝播[3]や呼出規約があるが、あくまでも同じプラットフォーム上のコンパイラ間のABIであり、プラットフォーム間の互換性までは要求されない。

EABI

[編集]

EABI (Embedded Application Binary Interface) とは、組み込みシステムのソフトウェアについてのファイルフォーマット、データ型、レジスタ使用法、スタックフレームの構成、関数の引数渡し方法などについての規約を意味する。

あるEABIをサポートするコンパイラで生成したオブジェクトコードは、同じEABIをサポートする別のコンパイラで生成したコードと互換性があり、コンパイラが異なっていても同じEABIに対応していればライブラリやオブジェクトコード間でリンク可能である。アセンブリ言語でコードを書く場合でもEABIに準拠するように書けば、他のコードとのリンクが保証される。

EABIと汎用OS向けABIとの主な違いは、アプリケーションのコードでも特権命令の使用が許されている点、ダイナミックリンクが要求されない点(完全に不可能とされている場合もある)、メモリを節約するためスタックフレームをなるべくコンパクトに構成している点が挙げられる[4]

EABIが広く使われているCPUアーキテクチャとしては、PowerPC[5]ARM[6]MIPS[7]がある。

EABIの選択は性能に影響することがある[8][9]

ABI共通化の試みとその成果

[編集]

Unix系OSでは、同じハードウェアプラットフォーム上で非互換な複数のOSが動作する。

例えばRISCチップにおいては以下のような例がある。

最も互換Unix系OSが多いのは、IA-32系であろう。それらOS間でABIを定義して相互にアプリケーションが動作できるようにしようという試みがいくつかあった。しかし、そのような計画が成功したことはない。Linuxにおいては、Linux Standard Base(LSB)が同様の試みを行っている(LSBはABI以外にも多くの規定を試みている)。

一方、採用ベンダ数が多く、複数のUnix系OSが乱立していたMIPS系においては、何度もABIの共通化を目指した試みがなされている。

例えば、1990年代中盤〜後半にかけてUNIXワークステーション / サーバにおいて、MIPS系CPUを採用したNEC(UX/4800)、Sony(NEWS)、住友電工EWS4800などのNECからのOEM品とSUMIStation)、日本タンデムコンピュータ(MIPS系だったNonStopServer)によるOCMP (Open Computing Environment for MIPS Platform) が定義され、シェアの維持など一定の成果を挙げた。OCMPはMIPS-ABIの日本語対応の側面とAPバスの標準化による周辺デバイスの共通化の側面がある。

脚注

[編集]
  1. ^ Intel Binary Compatibility Standard (iBCS)
  2. ^ Itanium C++ ABI (compatible with multiple architectures)
  3. ^ Itanium C++ ABI: Exception Handling (compatible with multiple architectures)
  4. ^ “EABI Summary”. PowerPC Embedded Application Binary Interface: 32-Bit Implementation (Version 1.0 ed.). Freescale Semiconductor, Inc. (1995-10-01). pp. 28–30. http://www.freescale.com/files/32bit/doc/app_note/PPCEABI.pdf 
  5. ^ "PowerPC Embedded Processors Application Note"
  6. ^ EABI2
  7. ^ MIPS EABI
  8. ^ Debian ARM accelerates via EABI port”. Linuxdevices.com (2007年1月19日). 2012年7月14日時点のオリジナルよりアーカイブ。2007年10月11日閲覧。
  9. ^ Andrés Calderón and Nelson Castillo (2007年3月14日). “Why ARM's EABI matters”. Linuxdevices.com. 2007年10月22日時点のオリジナルよりアーカイブ。2007年10月11日閲覧。

関連項目

[編集]

外部リンク

[編集]
{{bottomLinkPreText}} {{bottomLinkText}}
アプリケーションバイナリインタフェース
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?