Tagged articles
linker
19 articles · Page 1 of 1
This article provides a visual deep-dive into the ELF file format, covering its header structure, program and section headers, segments versus sections, code/data/bss layout, symbol tables, relocation mechanics, dynamic linking with GOT/PLT, the execve loading sequence, and practical inspection tools like readelf and objdump.
ELFLinux internalsbinary analysis
0 likes · 18 min read

A C++ service that crashes after a harmless log module addition is traced back to undefined cross‑file global initialization order, revealing the static initialization order fiasco and how linking order and compiler‑generated init arrays can cause runtime failures.
C++Initialization FiascoMeyers Singleton
0 likes · 7 min read

This article explains the concept of strong and weak functions in C, shows how to declare them with GCC and other compilers, outlines the linker selection rules, and demonstrates practical uses such as library overrides, interrupt handlers, callbacks, test stubs, plugin systems, and related pitfalls.
C++EmbeddedGCC
0 likes · 9 min read

This article explains why C/C++ function and global variable addresses are fixed at link time, how modern operating systems provide each process with a private virtual address space, the role of ABI and linker scripts in defining segment layout, and how the loader later maps those virtual addresses to physical memory.
C++ELFaddress space
0 likes · 6 min read

This article explains how linkers determine virtual memory addresses during linking, describes the operating system's per‑process virtual address space, outlines ABI and ELF conventions including default base addresses and linker scripts, and shows how the loader later maps those virtual addresses to physical memory.
ELFaddress spacelinker
0 likes · 5 min read

The article explains how manually calculating absolute memory addresses for functions leads to error‑prone maintenance, introduces the concept of symbols to reference code by name, and details the role of object files, symbol tables, relocation tables, and the linking process that resolves addresses automatically.
Low-Level Programmingcompilationlinker
0 likes · 8 min read

This article walks through how a compiler turns human‑readable source code into binary machine instructions, covering tokenization, parsing, abstract syntax tree construction, code generation, optimization, and linking, while highlighting the role of LLVM as a portable backend.
ASTCompilerLLVM
0 likes · 5 min read

This article explains the memory layout of a program, the compilation and linking processes, and compares static and dynamic libraries, highlighting how static linking duplicates code while dynamic linking shares libraries to reduce disk and memory usage.
Dynamic LibraryMemory LayoutShared Library
0 likes · 7 min read

This article explains why C programs can sometimes compile and run correctly even when global variables or functions are defined multiple times, by introducing symbol tables, the distinction between strong and weak symbols, and the linker rules that decide which definition is used.
compilationglobal variableslinker
0 likes · 7 min read

This article explains the concept of weak symbols and weak references in C, demonstrates their behavior with practical examples, and shows how they can be leveraged to create maintainable, cross‑platform embedded drivers while addressing compiler differences and linker nuances.
Cross-platform Developmentc-programmingcompiler attributes
0 likes · 20 min read

This guide explains how GNU ld linker scripts work, covering their purpose, basic concepts like sections, symbols, VMA/LMA, the syntax of SECTIONS, INPUT, OUTPUT, and other commands, with practical examples and code snippets for embedded and desktop ELF binaries.
ELFEmbeddedGCC
0 likes · 30 min read

This article explores how C++ programs start, detailing the role of the _start entry point, the initialization of global objects via .init_array, __libc_csu_init, and constructors, and provides practical techniques—including linking with crt files and using init_priority—to control and debug initialization order and avoid crashes.
C++ELFglobal initialization
0 likes · 23 min read

This article explains the fundamental concepts behind C language compilation, covering lexical, syntax, and semantic analysis, GCC options, file types, static and dynamic linking, ELF structure, and the loader process that turns source code into a runnable program.
C++ELFGCC
0 likes · 23 min read

This article explains how Meituan engineers shrink Android native .so libraries by analyzing ELF sections, simplifying dynamic symbols, removing dead code, using link‑time optimization, garbage‑collecting sections, applying size‑focused compiler flags, disabling exceptions/RTTI, and merging or extracting libraries, achieving 30‑60% APK size reductions and faster load times.
AndroidBuild ToolsELF
0 likes · 31 min read

This article provides an in‑depth technical overview of the ld64 static linker used in iOS builds, explaining its architecture, how it parses .o, .a and .dylib files, manages symbols, atoms and fixups, resolves undefined references, performs dead‑code stripping, and generates the final executable.
dead stripiOSld64
0 likes · 30 min read

This comprehensive guide explains the inner workings of Apple's ld64 static linker for iOS, covering its historical background, core concepts such as objects, archives, symbols, and fixups, command‑line parameters, execution phases, symbol resolution, dead‑code stripping, optimization passes, output generation, auto‑linking, the -ObjC flag, debugging options, and LTO support.
dead stripiOSld64
0 likes · 31 min read

The article explains how the Linux kernel discovers and calls module initialization functions like inet_init by using the fs_initcall macro, which creates static initcall variables placed in specially‑named sections that the linker groups and the kernel iterates at boot time.
C++InitcallLinux
0 likes · 8 min read

This article explains Android's linker workflow for loading and linking native .so libraries, detailing the do_dlopen sequence, ELF parsing, memory mapping, soinfo allocation, relocation handling, and constructor calls, and concludes with a brief overview of common SO packing techniques.
AndroidELFNative
0 likes · 19 min read

On Linux, C source is turned into an ELF executable through compilation with gcc, linking of object files and libraries, and loading by the kernel, a process that depends on CPU architecture, binary formats, symbol tables, dynamic relocation, and startup code before main runs.
C++ELFLinux
0 likes · 29 min read
