0

如何知道或找到一个共享库 .so 文件链接到多少个其他共享库 .so 文件?

4

1 回答 1

2

用于ldd查看链接器依赖项:

$ ldd /bin/ls
    linux-vdso.so.1 =>  (0x00007fff785ff000)
    libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f577a35e000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f577a156000)
    libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007f5779f4d000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5779b8e000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f577998a000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f577a5a1000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f577976c000)
    libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007f5779567000)
$ ldd /lib/x86_64-linux-gnu/libselinux.so.1
    linux-vdso.so.1 =>  (0x00007fff0a2a7000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f72bec97000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f72be8d8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f72bf0de000)
于 2013-10-22T10:36:29.320 回答