Linux中ldd命令介绍

本文主要介绍Linux操作系统中 ldd 命令的相关内容。

1 概述

ldd - print shared object dependencies.

ldd prints the shared objects (shared libraries) required by each program or shared object specified on the command line.

In the usual case, ldd invokes the standard dynamic linker (see ld.so(8)) with the LD_TRACE_LOADED_OBJECTS environment variable set to 1.  This causes the dynamic linker to inspect the program's dynamic dependencies, and find (according to the rules described in ld.so(8)) and load the objects that satisfy those dependencies.  For each dependency, ldd displays the location of the matching object and the (hexadecimal) address at which it is loaded.  (The linux-vdso and ld-linux shared dependencies are special; see vdso(7) and ld.so(8).)

2 语法

ldd [option]... file...

3 用法介绍

-r选项, --function-relocs:Perform relocations for both data objects and functions, and report any missing objects or functions (ELF only).

猜你喜欢

转载自blog.csdn.net/liitdar/article/details/81279061
ldd