Application Binary Interface
Documentation and references for the NetBSD ABI.
XXX TBD:
- Mark references as normative, informative, or possibly misleading.
- Make sure these are synced with the comments in src/ld.elf_so/arch//reloc.c.
- Save archival copies on TNF hosts in case the archive links go kaput.
NetBSD Application Binary Interface
ELF
XXX link gABI
Thread-local storage
- Linker and Libraries Guide, Part IV: ELF Application Binary Interface, Chapter 14: Thread-Local Storage, Oracle, Part No: 819-0690-10, November 2011
- Ulrich Drepper, ELF Handling For Thread-Local Storage, Version 0.21, 2023-08-22 (archive)
Exception handling and unwinding
XXX
Debug data: DWARF, CTF
XXX
Library versioning and compatibility
- Symbol versions in NetBSD libraries
- Ulrich Drepper, How To Write Shared Libraries, 2011-12-10 (archive)
- Ulrich Drepper, ELF Symbol Versioning, 2017-12-21 (archive)
Processor supplements
aarch64
- ELF for the Arm 64-bit Architecture (AArch64), 2022Q3, Arm Ltd.
- Glauber de Oliveira Costa and Alexandre Oliva, Thread-Local Storage Access in Dynamic Libraries in the ARM Platform, 2006.
alpha
ELF Alpha support may be bespoke to NetBSD, or GNU gcc/binutils; it appears neither DEC nor SCO nor anyone else never published an Alpha psABI.
XXX (add refs to libexec/ld.elf_so/arch/alpha/alpha_reloc.c too)
- Alpha Architecture Reference Manual, 4th ed., Compaq Computer Corporation, January 2002 (archive)
- Digital UNIX: Calling Standard for Alpha Systems, Digital Equipment Corporation, Part Number: AA-PY8AC-TE, March 1996 (archive)
- ALPHA Calling Standard, Revision 2.0, Digital Equipment Corporation, 1990-04-27 (copy, archive)
amd64
- System V Application Binary Interface: AMD64 Architecture Processor Supplement, Draft Version 0.99.6, 2013-10-07 (archive, source code)
arm (32-bit)
- ELF for the Arm Architecture, 2022Q3, Arm Ltd.
hppa
ELF and TLS:
- Processor-Specific ELF Supplement for PA-RISC, Version 1.5, 1998-08-20 (archive)
- Randolph Chung, Carlos O'Donell, and John David Anglin, Implementing Thread Local Storage for HP PA-RISC Linux, 2013-11-11 (archive)
PA-RISC 1.1 ABI:
- The 32-bit PA-RISC Runtime Architecture Document, HP-UX 10.20, Version 3.0, Hewlett-Packard, 1997 (archive)
PA-RISC 2.0 ABI:
- 32-bit PA-RISC Runtime Architecture Document, HP-UX 11.0, Version 1.0, Hewlett-Packard, 1997 (archive)
- 64-bit Runtime Architecture for PA-RISC 2.0, Version 3.3, Hewlett-Packard, 1997-10-06 (archive)
i386
- System V Application Binary Interface: Intel386 Architecture Processor Supplement, 4th ed., 1997-03-19, The Santa Cruz Operation, Inc. (archive)
Note: Intel and SuSE have published a 2015 revision (archive, source code) to the SysV ELF supplement, which NetBSD does not implement—for example, the original SysV ABI from SCO only mandates 4-byte alignment of the stack pointer, which is all that NetBSD/i386 guarantees, while the updated one has been incompatibly modified to guarantee 16-byte alignment.
ia64
- Intel Itanium Processor-specific Application Binary Interface, Intel, Document Number: 245370-003, May 2001 (archive)
m68k
XXX (add refs to libexec/ld.elf_so/arch/alpha/alpha_reloc.c too)
- System V Application Binary Interface: Motorola 68000 Processor Family Supplement, AT&T, 1990 (copy, archive)
mips
- System V Application Binary Interface: MIPS RISC Processor Supplement, 3rd ed., The Santa Cruz Operation, Inc. (archive)
- 64-bit ELF Object File Specification, Draft Version 2.5, MIPS Technologies / Silicon Graphics Computer Systems (archive)
XXX Applicable? MIPSpro 64-bit, MIPSpro N32 ABI Handbook
powerpc
- Ryan S. Arnold, Greg Davis, Brian Deitrich, Michael Eager, Emil Medve, Steven J. Munroe, Joseph S. Myers, Steve Papacharalambous, Anmol P. Paralkar, Katherine Stewart, and Edmar Wienskoski, Power Architecture 32-bit Application Binary Interface Supplement, Version 1.0, Power.org, 2011-04-19 (archive)
- Ian Lance Taylor, 64-bit PowerPC ELF Application Binary Interface Supplement, Version 1.9, Zembu Labs (archive)
riscv
- RISC-V ELF Specification, 2024-07-17
sh3
- SH-4 generic and C specific application binary interface, 7839242 Rev 2, October 2011, STMicroelectronics (archive)
sparc/sparc64
- SPARC Compliance Definition, Version 2.4.1, 1999-07-24, SPARC International, Inc. (archive)
Encompasses the SysV SPARC psABI (System V Application Binary Interface: SPARC Processor Supplement, 3rd ed., 1996, The Santa Cruz Operation, Inc., archive).
vax
ELF VAX support is bespoke to NetBSD, courtesy of Matt Thomas (matt@); there is no VAX psABI.
External Links
Relevant information and further references, not necessarily applicable to NetBSD:
- μClibc: Specifications
- Oracle: Linker and Libraries Guide (PDF, archive)
- Wikipedia: Executable and Linking Format
- Linux Foundation: Referenced Specifications
- osdev.org: ELF
- osdev.org: System V ABI
- ATLAS Assembly Homepage
- Linux PARISC Wiki: Technical Documentation (archive)
- Linux on PA-RISC documentation