What Is a Shared Object?
A shared object is a compiled library, often with a .so or .dll extension, that is loaded by the dynamic linker when a program runs instead of being baked into the executable. Many processes can map the same shared object, so one copy of its code serves all of them. It must usually be built as position-independent code.
Why it matters
Shared objects shrink executables and let a single library update benefit every program that uses it. The cost is dependency management, since the right version must be present at runtime.
Related guides
What Is a Static Library?A static library is an archive of object files whose needed code is copied directly into an executable at lin…
What Is a Dynamic Linker?A dynamic linker loads the shared libraries a program depends on at startup and binds its references to the f…
What Is Position-Independent Code (PIC)?Position-independent code runs correctly regardless of the address it is loaded at, by addressing data and ca…