zoukankan      html  css  js  c++  java
  • 查询动态库文件(Windows *.dll, Linux *.so)所依赖的文件

    1.Windows下查询dll/exe所依赖的文件:

    工具:VS 自带dumpbin.exe, 例如C:Program Files (x86)Microsoft Visual Studio 14.0VCin 下

    若:

    Image has the following delay load dependencies,列出的为运行时动态加载的dll。
    Image has the following dependencies,列出的为载入程序时加载的dll

     1 C:Program Files (x86)Microsoft Visual Studio 14.0VCin>dumpbin.exe  /dependents D:pyCQATestCase
    body.exe
     2 Microsoft (R) COFF/PE Dumper Version 14.00.24215.1
     3 Copyright (C) Microsoft Corporation.  All rights reserved.
     4 
     5 
     6 Dump of file D:pyCQATestCase
    body.exe
     7 
     8 File Type: EXECUTABLE IMAGE
     9 
    10   Image has the following dependencies:
    11 
    12     glew64.dll
    13     freeglut.dll
    14     KERNEL32.dll
    15     OPENGL32.dll
    16     GLU32.dll
    17 
    18   Summary
    19 
    20         7000 .data
    21         1000 .nvFatBi
    22       118000 .nv_fatb
    23         5000 .pdata
    24        25000 .rdata
    25         2000 .reloc
    26         1000 .rsrc
    27        53000 .text
    28         1000 .tls
    View Code

    查看dll文件,其实也有很多dll依赖

    C:Program Files (x86)Microsoft Visual Studio 14.0VCin>dumpbin.exe  /dependents D:pyCQATestCasefreeglut.dll
    Microsoft (R) COFF/PE Dumper Version 14.00.24215.1
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file D:pyCQATestCasefreeglut.dll
    
    File Type: DLL
    
      Image has the following dependencies:
    
        KERNEL32.dll
        USER32.dll
        GDI32.dll
        ADVAPI32.dll
        OPENGL32.dll
        WINMM.dll
    
      Summary
    
            A000 .data
            3000 .pdata
           1F000 .rdata
            2000 .reloc
            1000 .rsrc
           22000 .text
    View Code

    2. Linux 下直接用ldd 即可

  • 相关阅读:
    深入分析 Java 中的中文编码问题
    随便写写20160411
    Linux GDB 程序调试工具使用详解
    「美国花好几亿造出太空圆珠笔后,发现苏联航天员用铅笔」的故事真实吗?
    verynginx部署
    harbor私有仓库部署
    rancher学习
    harbor部署
    zabbix-proxy docker
    NFS部署
  • 原文地址:https://www.cnblogs.com/ASAP/p/11054240.html
Copyright © 2011-2022 走看看