You know those "cannot open shared object file" errors that send you down a rabbit hole of LD_LIBRARY_PATH exports and Google searches? This cuts through that. It covers the full spectrum: compiling shared libraries with proper soname versioning, RPATH versus RUNPATH (and why RUNPATH is better for runtime flexibility), dlopen/dlsym plugin patterns, and LD_PRELOAD interposition for function hooking. The symbol visibility section alone will save you from export bloat. What I appreciate is the search order diagram and the $ORIGIN trick for relocatable installs. If you've ever shipped software that worked on your machine but failed on deployment because of linking issues, you need this reference.

skills.sh installs
650
GitHub stars
279
last updated
Aug 21, 2026

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill dynamic-linking --agent claude-code

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Category
Debugging
First seen
Jun 3, 2026

More from mohitmishra786/low-level-dev-skills

All 54

Recommended

More Debugging
1bobmatnyc avataropentelemetrybobmatnyc/claude-mpm-skillsOpenTelemetry observability patterns: traces, metrics, logs, context propagation, OTLP export, Collector pipelines, and troubleshooting647skills.sh installs
2akin-ozer avatarpromql-validatorakin-ozer/cc-devops-skillsValidate, lint, audit, or fix PromQL queries and alerting rules; detects anti-patterns.646skills.sh installs
3dig1t avatarluau-best-practicesdig1t/skillsLuau best practices and clean code patterns for Roblox development. Use this skill when: - Writing new Luau modules, services, or controllers - Reviewing code f643skills.sh installs
4yetone avatarnative-feel-cross-platform-desktopyetone/native-feel-skillUse when the user is designing, prototyping, or rewriting a desktop app that must run on multiple OSes (macOS + Windows, optionally Linux) AND feel indistinguis641skills.sh installs
5warpdotdev avatarseo-aeo-auditwarpdotdev/oz-skillsOptimize for search engine visibility, ranking, and AI citations. Use when asked to improve SEO, optimize for search, fix meta tags, add structured data, or imp630skills.sh installs
6jwynia avatarcharacter-arcjwynia/agent-skillsDesign and troubleshoot character transformation arcs. Use when characters feel static, when transformation feels unearned or abrupt, when you can't articulate 629skills.sh installs