zoukankan      html  css  js  c++  java
  • ldd 命令用于判断某个可执行的binary档案含有什么动态链接库(so)

    [root@NB ok]# ldd /bin/ls
        linux-vdso.so.1 =>  (0x00007ffd7dbf6000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003429c00000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003428c00000)
        libcap.so.2 => /lib64/libcap.so.2 (0x0000003434400000)
        libacl.so.1 => /lib64/libacl.so.1 (0x0000003432800000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003428400000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003428000000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003427c00000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003428800000)
        libattr.so.1 => /lib64/libattr.so.1 (0x0000003438000000)
    [root@NB ok]# rpm -qf /usr/bin/ldd
    glibc-common-2.12-1.166.el6.x86_64

    ldd命令通常使用"-v"来显示所依赖的动态库的尽可能的详细信息:

    [root@NB ok]# ldd -v /bin/ls
        linux-vdso.so.1 =>  (0x00007ffe97f6e000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003429c00000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003428c00000)
        libcap.so.2 => /lib64/libcap.so.2 (0x0000003434400000)
        libacl.so.1 => /lib64/libacl.so.1 (0x0000003432800000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003428400000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003428000000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003427c00000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003428800000)
        libattr.so.1 => /lib64/libattr.so.1 (0x0000003438000000)
    
        Version information:
        /bin/ls:
            librt.so.1 (GLIBC_2.2.5) => /lib64/librt.so.1
            libacl.so.1 (ACL_1.0) => /lib64/libacl.so.1
            libacl.so.1 (ACL_1.2) => /lib64/libacl.so.1
            libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
    。。。。。。
    # ldd haproxy 
        linux-vdso.so.1 =>  (0x00007fffea9ff000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003a88400000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003a85400000)
        libfreebl3.so => /lib64/libfreebl3.so (0x0000003a87400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003a85000000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003a85c00000)
  • 相关阅读:
    字符串匹配之朴素匹配
    XSS的攻击原理
    使用metasploit收集邮箱
    C++实现折半插入排序
    C++插入排序实现
    Java中的NIO
    Hashtable和HashMap区别(面试)
    面向对象:封装(一):构造函数;类的主方法;权限修饰符;对象的创建
    switch多分支语句
    递归和字母数字生成随机数
  • 原文地址:https://www.cnblogs.com/bass6/p/6184219.html
Copyright © 2011-2022 走看看