LinuxCommandLibrary

ld.so

dynamic linker/loader

TLDR

Run with library path
$ LD_LIBRARY_PATH=[/path/to/libs] [program]
copy
Preload library
$ LD_PRELOAD=[/path/to/lib.so] [program]
copy
Debug loading
$ LD_DEBUG=libs [program]
copy
Show search paths
$ ldconfig -p
copy
Update library cache
$ sudo ldconfig
copy

SYNOPSIS

ld.so / ld-linux.so is the dynamic linker

DESCRIPTION

ld.so is the dynamic linker/loader. It loads shared libraries needed by programs at runtime.
The loader resolves symbols and handles library dependencies. Environment variables control its behavior.

PARAMETERS

LD_LIBRARY_PATH

Additional library directories.
LD_PRELOAD
Libraries to load first.
LD_DEBUG
Debug options (libs, reloc, files).
LD_TRACE_LOADED_OBJECTS
List dependencies (like ldd).

CAVEATS

Not directly invoked usually. Security implications of LD_PRELOAD. Ignored for setuid binaries.

HISTORY

ld.so is part of the glibc package, implementing dynamic linking for Linux executables.

SEE ALSO

ldd(1), ldconfig(8), ld(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard