Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

min-dl

> 编程语言
Open source

minimal dynamic linker implementation for ELF, supporting x86_64 and Arm/Aarch64

200 stars0 likes2 views
WebsiteGitHub

About

minimal dynamic linker implementation for ELF, supporting x86_64 and Arm/Aarch64

min-dl: minimal dynamic linker implementation

min-dl is a minimal ELF dynamic linker that loads a shared library, performs relocations, resolves symbols, and runs init/fini constructors -- all without depending on glibc's ld-linux runtime.

How it works

ELF executables and shared libraries that call external functions typically contain a Procedure Linkage Table (PLT), which adds a level of indirection for function calls analogous to that provided by the GOT for data. Deferring symbol resolution can reduce startup cost because unresolved entries are only fixed up when actually called.

min-dl loads a shared object via mmap, processes its dynamic section (symbol tables, hash tables, relocation entries, init/fini arrays), and performs the necessary relocations. Standard relocations (including PLT JUMP_SLOT entries) are resolved eagerly at load time. A callback-based PLT trampoline is also provided for callers that want deferred resolution through the set_plt_resolver API.

Supported architectures

  • x86-64
  • ARM (32-bit)
  • AArch64
  • RISC-V (64-bit)

Adding a new architecture requires an arch/.h header with platform-specific assembly macros, relocation handling in loader.c, and a machine type check.

Build and test

Prerequisites: a C toolchain (GCC), make, and for cross-architecture testing, the corresponding cross-compiler and QEMU user-mode emulator.

make clean && make
make check

Cross-compilation targets (build only):

make arm          # ARM 32-bit
make aarch64      # AArch64
make riscv64      # RISC-V 64-bit

Each architecture has a corresponding check_ target that runs the tests under the appropriate QEMU user-mode emulator:

make check_arm
make check_aarch64
make check_riscv64

Licensing

min-dl is licensed under the BSD 2-Clause License; see LICENSE.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言