相關指令:
ldd
LD_LIBRARY_PATH
file
描述:
程式的動態函式庫解析:ldd
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.
OPTIONS
--version
Print the version number of ldd.
-v --verbose
Print all information, including e.g. symbol versioning information.
-u --unused
Print unused direct dependencies.
-d --data-relocs
Perform relocations and report any missing objects (ELF only).
-r --function-relocs
Perform relocations for both data objects and functions, and report
any missing objects or functions (ELF only).
--help Usage information.
db4102:/magma/cdbu-release/siliconsmart/SiliconSmart-2011.04.03-3353/linux24_x86_64/bin>ldd siliconsmart
linux-gate.so.1 => (0xffffe000)
libdl.so.2 => /lib/libdl.so.2 (0x006ce000)
libtermcap.so.2 => /lib/libtermcap.so.2 (0x55556000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00a6b000)
libpthread.so.0 => /lib/libpthread.so.0 (0x006b5000)
libutil.so.1 => /lib/libutil.so.1 (0x00a3a000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x5555b000)
librt.so.1 => /lib/librt.so.1 (0x00ad0000)
libz.so.1 => /usr/lib/libz.so.1 (0x00926000)
libelf.so.1 => /usr/lib/libelf.so.1 (0x5558d000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x555a4000)
libm.so.6 => /lib/libm.so.6 (0x0068c000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x006d4000)
libc.so.6 => /lib/libc.so.6 (0x00545000)
/lib/ld-linux.so.2 (0x00527000)
觀察檔案類型: file
db4102:/magma/cdbu-release/siliconsmart/SiliconSmart-2011.04.03-3353/linux24_x86_64/bin>file siliconsmart
siliconsmart: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
動態聯結庫位置: LD_LIBRARY_PATH
env | grep LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/lib:/projects/fs_utils/builds/release/FINESIM.2011.11/FINESIM/finesim/platform/Linux64:/projects/fs_utils/builds/release/FINESIM.2011.11/FINESIM/finesim/platform/Linux64:/usr/lib:/lib:/usr/local/X11R6/lib:/usr/ucblib:/tools/cad/aldec/2008.06/bin:/home/mojave/tools/cadence/CDS_61_INSTALL/CDS_INST_DIR/tools/lib
LD_LIBRARY_PATH_BEFORE_CADENCE=/projects/fs_utils/builds/release/FINESIM.2011.11/FINESIM/finesim/platform/Linux64:/projects/fs_utils/builds/release/FINESIM.2011.11/FINESIM/finesim/platform/Linux64:/usr/lib:/lib:/usr/local/X11R6/lib:/usr/ucblib:/tools/cad/aldec/2008.06/bin