I never really understood: what is Application Binary Interface (ABI)?
Posted
by claws
on Stack Overflow
See other posts from Stack Overflow
or by claws
Published on 2010-01-31T09:30:24Z
Indexed on
2010/03/19
20:11 UTC
Read the original article
Hit count: 188
I never clearly understood what is an ABI. I'm sorry for such a lengthy question. I just want to clearly understand things. Please don't point me to wiki article, If could understand it, I wouldn't be here posting such a lengthy post.
This is my mindset about different interfaces:
TV remote is an interface between user and TV. It is an existing entity but useless (doesn't provide any functionality) by itself. All the functionality for each of those buttons on the remote is implemented in the Television set.
Interface: It is a "existing entity" layer between the
functionality
andconsumer
of that functionality. An, interface by itself is doesn't do anything. It just invokes the functionality lying behind.Now depending on who the user is there are different type of interfaces.
Command Line Interface(CLI) commands are the existing entities, consumer is the user and functionality lies behind.
functionality:
my software functionality which solves some purpose to which we are describing this interface.
existing entities:
commands
consumer:
userGraphical User Interface(GUI) window,buttons etc.. are the existing entities, again consumer is the user and functionality lies behind.
functionality:
my software functionality which solves some purpose to which we are describing this interface.
existing entities:
window,buttons etc..
consumer:
userApplication Programming Interface(API) functions or to be more correct, interfaces (in interfaced based programming) are the existing entities, consumer here is another program not a user. and again functionality lies behind this layer.
functionality:
my software functionality which solves some purpose to which we are describing this interface.
existing entities:
functions, Interfaces(array of functions).
consumer:
another program/application.Application Binary Interface (ABI) Here is my problem starts.
functionality:
???
existing entities:
???
consumer:
???
- I've wrote few softwares in different languages and provided different kind of interfaces (CLI, GUI, API) but I'm not sure, if I ever, provided any ABI.
http://en.wikipedia.org/wiki/Application_binary_interface says:
ABIs cover details such as
- data type, size, and alignment;
- the calling convention, which controls how functions' arguments are passed and return values retrieved;
- the system call numbers and how an application should make system calls to the operating system;
Other ABIs standardize details such as
- the C++ name mangling,[2] .
- exception propagation,[3] and
- calling convention between compilers on the same platform, but do not require cross-platform compatibility.
Who needs these details? Please don't say, OS. I know assembly programming. I know how linking & loading works. I know what exactly happens inside.
Where did C++ name mangling come in between? I thought we are talking at the binary level. Where did languages come in between?
anyway, I've downloaded the [PDF] System V Application Binary Interface Edition 4.1 (1997-03-18) to see what exactly it contains. Well, most of it didn't make any sense.
Why does it contain 2 chapters (4th & 5th) which describe the ELF file format.Infact, these are the only 2 significant chapters that specification. Rest of all the chapters "Processor Specific". Anyway, I thought that it is completely different topic. Please don't say that ELF file format specs are the ABI. It doesn't qualify to be
Interface
according to the definition.I know, since we are talking at such low level it must be very specific. But I'm not sure how is it "Instruction Set Architecture(ISA)" specific?
Where can I find MS Window's ABI?
So, these are the major queries that are bugging me.
© Stack Overflow or respective owner