Dynamic Linking
Linux ELF shared library guide covering loading failures, RPATH/RUNPATH, soname versioning, dlopen plugins, and symbol visibility.
- CCM score
- 60 of 100
- skills.sh installs
- 737
- GitHub stars
- 303
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers library creation, soname versioning, RPATH vs RUNPATH, search order,
dlopen/dlsymplugins, andLD_PRELOADinterposition - Includes build commands,
readelf,ldd,LD_DEBUG=libs, andnm -Dchecks, plus a table of common loader errors and fixes - Recommends RUNPATH with
--enable-new-dtagsand$ORIGINfor relocatable installs, and-fvisibility=hiddenfor default symbol hiding - Designed for developers debugging "cannot open shared object file" errors or building plugin systems on Linux
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill dynamic-linking -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Dynamic Linking
Purpose
Guide agents through Linux dynamic linking: shared library creation, RPATH/RUNPATH configuration, soname versioning, dlopen/dlsym plugin patterns, LD_PRELOAD interposition, and symbol visibility control.
Triggers
- "Cannot open shared object file: No such file or directory"
- "How do I set RPATH so my binary finds its shared library?"
- "How do I use dlopen/dlsym for a plugin system?"
- "What's the difference between RPATH and RUNPATH?"
- "How do I use LD_PRELOAD to intercept a function?"
- "How do I version my shared library with soname?"
Workflow
1. Creating a shared library
# Compile with -fPIC (position-independent code)
gcc -fPIC -c src/mylib.c -o mylib.o
# Link shared library with soname
gcc -shared -Wl,-soname,libmylib.so.1 \
mylib.o -o libmylib.so.1.2.3
# Create symlinks (standard convention)
ln -s libmylib.so.1.2.3 libmylib.so.1 # soname link (used by ldconfig)
ln -s libmylib.so.1 libmylib.so # link link (used at compile time)
# Register with ldconfig (system-wide)
sudo cp libmylib.so.1.2.3 /usr/local/lib/
sudo ldconfig
2. Soname versioning convention
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- Debugging, CLI & Terminal
- First seen
- Jun 3, 2026
Questions
What does the dynamic-linking skill help with?
The dynamic-linking skill guides an agent through Linux ELF shared libraries, including library loading failures, RPATH versus RUNPATH, soname versioning, dlopen and dlsym plugin patterns, LD_PRELOAD interposition, and symbol visibility control. It activates on errors such as "cannot open shared object file" and on queries about LD_LIBRARY_PATH.
How do I install the dynamic-linking skill?
Run npx -y skills add mohitmishra786/low-level-dev-skills --skill dynamic-linking -y in your project. Once installed, the agent can walk you through diagnosing shared library loading problems and configuring library search paths.
Where does dynamic-linking stand in the Debugging category?
dynamic-linking is listed in the Debugging category on Claude Marketplaces, alongside diagnosing-bugs, safe-debug, systematic-debugging and sentry-cli. It focuses on a narrower area than those general debugging skills, covering how shared libraries are found and loaded at runtime on Linux.
Does dynamic-linking help with LD_PRELOAD and symbol visibility?
Yes, the skill covers LD_PRELOAD interposition, where a library loaded first overrides functions such as malloc, and controlling which symbols a shared library exports. It also explains soname versioning and when to bump the major, minor or patch version.
More from mohitmishra786/low-level-dev-skills
All 54- Rust Ffi713
- Rust Sanitizers Miri713
- Rust Unsafe705
- Pgo695
- Interpreters689
- Cargo Workflows686
- Meson685
- Rust Debugging676
- Cpp Modules669
- Hardware Counters666
- Debug Optimized Builds652
- Rustc Basics649
- Cpp Templates648
- Rust Cross642
- Wasm Emscripten628
- Zig Debugging617
- Zig Build System616
- Wasm Wasmtime599
- Zig Cross598
- Zig Cinterop586
- Cmake2K
- Static Analysis1.4K
- Gdb1.3K
- Llvm1K
Similar to Dynamic Linking
More Debuggingelf-inspectionmohitmishra786/low-level-dev-skills806 installsGuide to inspecting Linux ELF binaries with readelf, objdump, nm, and ldd for linking and symbol diagnosis.
debug-optimized-buildsmohitmishra786/low-level-dev-skills652 installsPractical guide for diagnosing optimized and release builds, covering -Og, RelWithDebInfo, and inlined frames in GDB.
dwarf-experttrailofbits/skills6.3K installsExpert guidance for inspecting, verifying, and parsing DWARF debug info in compiled binaries.
anti-debugging-techniquesyaklang/hack-skills4.2K installsAnti-debugging playbook covering ptrace, PEB flags, timing checks, and signal or exception tricks on Linux and Windows, with bypass methods.
rspack-debuggingrstackjs/agent-skills294 installsRspack-specific LLDB debugging guide for native crashes, segfaults, deadlocks, and stuck builds with debug symbols.
nginx-c-module-debugpproenca/dot-skills264 installsStructured debugging guide for nginx C modules covering crashes, memory bugs, GDB analysis, and request tracing.