Systems Programming · Cluster

C and the ABI

Data layout, linkage, and calling conventions.

  1. 01 Struct Padding and the Alignment Rule Behind sizeof How alignment requirements, member order, and trailing padding determine a structure size, and why reordering members can shrink it without changing any field. foundational · Jan 29, 2026
  2. 02 Integer Object Representation and Conversion at the Boundary How signed and unsigned values are stored, what integer promotion silently does to an operand, and which conversions are defined, implementation-defined, or undefined. foundational · Jan 5, 2026
  3. 03 Function Call ABI: Register Assignment on x86-64 How the System V AMD64 ABI classifies arguments into eightbyte chunks, why some structures travel in registers and others on the stack, and what the callee must preserve. foundational · Dec 18, 2024
  4. 04 Linkage, Symbol Visibility, and the Weak Definition What the linker actually does with an external declaration, how internal and external linkage differ, and the resolution order that makes weak and common symbols dangerous. intermediate · Sep 27, 2026
  5. 05 Variadic Calls and the Default Argument Promotions What a va_list actually points at, why float and char arguments are widened before a variadic call, and how the absence of type information turns a wrong format into undefined behaviour. intermediate · Oct 13, 2026
  6. 06 Bitfield Allocation and Packed Structures How bit-fields are packed into storage units on the two major ABIs, why the standard leaves the bit order open, and what packed structs cost at every member access. intermediate · Jun 8, 2025
  7. 07 Strict Aliasing and the Effective Type of an Object Why two pointers of different types cannot in general name the same memory, which union and character-type accesses are permitted, and what an optimiser does with the rule. intermediate · Jun 13, 2025
  8. 08 Position-Independent Code, the PLT, and the GOT Why a shared object cannot know its load address, how the global offset table turns an absolute address into a load-time fixup, and what lazy binding defers. advanced · Jul 31, 2026
  9. 09 Stack Unwinding and DWARF Call Frame Information How a frame is described by bytecode in .eh_frame, what the unwinder reconstructs at each step, and why a missing unwind table turns an exception into a terminate call. advanced · Jul 2, 2025
  10. 10 Cross-Language Calls and the Structure-Passing Contract What a foreign function interface has to agree on beyond the function name, from name mangling and by-value aggregates to error conventions and memory ownership. advanced · May 30, 2023