The System V Application Binary Interface named ABI defines a system interface for compiled application programs.
This System V Application Binary Interface is a set of specifications that detail calling conventions, object file formats, executable file formats, dynamic linking semantics, and much more.
The ABI defines a binary interface for application programs that are compiled for System V implementations on many different hardware architectures.
Also the System V ABI is a family of specifications composed of two basic parts:
– a generic part of the specification ( describes those parts of the interface that remain constant across all hardware implementations of System V;
– a processor-specific part ( the specification describes the parts of the specification that are specific to a particular processor architecture ).
Example:
Virtual addresses and file offsets for the 64-bit PowerPC processor family segments are congruent modulo 64
Kbytes (0x10000) or larger powers of 2. Although 4096 bytes is currently the 64-bit PowerPC page size, this
allows files to be suitable for paging even if implementations appear with larger page sizes. The value of the
p_align member of each program header in a shared object file must be 0x10000.
You need to put segments with different characteristics in separate 256 Mbyte portions of the address space, to give the operating system full paging flexibility in the 64-bit address space.
One example of an executable file (the program linked with a base address of 0x10000000):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 0 ELF header Program header table Other information File Offset 0x100 - Virtual Address <strong>0x10000100</strong> Text segment . . . 0x2be00 bytes <strong>0x1002beff</strong> File Offset 0x2bf00 - Virtual Address <strong>0x2003bf00</strong> Data segment . . . 0x4e00 bytes <strong>0x20040cff</strong> File Offset 0x30d00 Other information |
The possible corresponding program header segments:
1 2 3 4 5 6 7 8 | p_type PT_LOAD PT_LOAD p_offset 0x100 0x2bf00 p_vaddr 0x10000100 0x2003bf00 p_paddr unspecified unspecified p_filesz 0x2be00 0x4e00 p_memsz 0x2be00 0x5e24 p_flags PF_R+PF_X PF_R+PF_W p_align 0x10000 0x10000 |
The memory image of virtual address for the program above is shown here, assuming 4096 (0x1000) byte pages.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | Text segment: 0x02000000 Header padding 0x100 bytes 0x02000100 Text segment ... 0x2be00 bytes 0x0202bf00 Data padding 0x100 bytes Data segment: 0x0203b000 Text padding 0xf00 bytes 0x0203bf00 Data segment ... 0x4e00 bytes 0x02040d00 Uninitialized data 0x1024 bytes 0x02041d24 Page padding 0x2dc zero bytes |
Documents about: System V ABI
TODO:Ensure whether these are the latest official links.
- System V ABI – Latest Base Document
- System V ABI – Older Base Document
- System V ABI – Intel386 Architecture Processor Supplement
- System V ABI – AMD64 Architecture Processor Supplement
- System V ABI – MIPS RISC Processor Supplement
- System V ABI – MIPSpro™ 64-Bit
- System V ABI – MIPSpro™ N32 ABI Handbook
- System V ABI – PowerPC Processor Supplement
- System V ABI – 64-bit PowerPC
- System V ABI – SPARC® Processor Supplement
- System V ABI – SPARC® Version 9 Processor Supplement
- System V ABI – K1OM Architecture Processor Supplement
- System V ABI – IA-64 Architecture Processor Supplement
- ELF Handling For Thread-Local Storage
- System V ABI Website