ldd 命令
2016-04-22 by dongnan
举个栗子
列出 libsvn_xxx.so
依赖的库。
# 执行命令
ldd -r /usr/lib64/libsvn_fs_base-1.so.0
linux-vdso.so.1 => (0x00007ffe6c732000)
libsvn_delta-1.so.0 => /usr/lib64/libsvn_delta-1.so.0 (0x00007fe3ebe62000)
libsvn_fs_util-1.so.0 => /usr/lib64/libsvn_fs_util-1.so.0 (0x00007fe3ebc5f000)
libsvn_subr-1.so.0 => /usr/lib64/libsvn_subr-1.so.0 (0x00007fe3eba0e000)
libz.so.1 => /lib64/libz.so.1 (0x00007fe3eb7f8000)
libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007fe3eb569000)
libaprutil-1.so.0 => /usr/lib64/libaprutil-1.so.0 (0x00007fe3eb344000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fe3eb10d000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fe3eaee5000)
libdb-4.7.so => /lib64/libdb-4.7.so (0x00007fe3eab70000)
libapr-1.so.0 => /usr/lib64/libapr-1.so.0 (0x00007fe3ea944000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe3ea727000)
libc.so.6 => /lib64/libc.so.6 (0x00007fe3ea392000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fe3ea18e000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fe3e9f89000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007fe3e9d86000)
/lib64/ld-linux-x86-64.so.2 (0x00000033c3800000)
帮助
# 执行命令
man ldd
NAME
ldd - print shared library dependencies
SYNOPSIS
ldd [OPTION]... FILE...
DESCRIPTION
ldd prints the shared libraries required by each program or shared library specified on the command line.
-r --function-relocs
Perform relocations for both data objects and functions, and report any missing objects or functions (ELF only).