I never clearly understood what an ABI is. Please don't point me to a Wikipedia article. If I could understand it, I wouldn't be here posting such a lengthy post.
This is my mindset about different interfaces:
A TV remote is an interface between the user and the 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 an "existing entity" layer between the
functionality
andconsumer
of that functionality. An interface by itself 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, the 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, and again the consumer is the user and functionality lies behind.
functionality:
my software functionality which solves some problem 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 problem to which we are describing this interface.
existing entities:
functions, Interfaces (array of functions).
consumer:
another program/application.Application Binary Interface (ABI) Here is where my problem starts.
functionality:
???
existing entities:
???
consumer:
???
- I've written software in different languages and provided different kinds of interfaces (CLI, GUI, and API), but I'm not sure if I have ever provided any ABI.
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,
- exception propagation, and
- calling convention between compilers on the same platform, but do not require cross-platform compatibility.
Who needs these details? Please don't say the OS. I know assembly programming. I know how linking & loading works. I know exactly what happens inside.
Why did C++ name mangling come in? I thought we are talking at the binary level. Why do languages come in?
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 two chapters (4th & 5th) to describe the ELF file format? In fact, these are the only two significant chapters of that specification. The rest of the chapters are "processor specific". Anyway, I though that it is a completely different topic. Please don't say that ELF file format specifications are the ABI. It doesn't qualify to be an interface according to the definition.
I know, since we are talking at such a low level it must be very specific. But I'm not sure how is it "instruction set architecture (ISA)" specific?
Where can I find Microsoft Windows' ABI?
So, these are the major queries that are bugging me.
Consumer: Compiler (Writer)
,Provider: OS (Maker)
,Functionality: Defining protocol on how to pass data
... (am just giving examples here). – Address