其中一個將做到這一點。請注意,您可以忽略Windows文件夾中的任何內容,因爲這些DLL將位於任何Windows系統上。
$ ldd /bin/grep
ntdll.dll => /Windows/SYSTEM32/ntdll.dll (0x77200000)
kernel32.dll => /Windows/system32/kernel32.dll (0x76fe0000)
KERNELBASE.dll => /Windows/system32/KERNELBASE.dll (0x7fefd090000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3ffb00000)
cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3ffae0000)
cygpcre-1.dll => /usr/bin/cygpcre-1.dll (0x3ff850000)
或者
$ cygcheck /bin/grep
C:\cygwin64\bin\grep.exe
C:\cygwin64\bin\cygwin1.dll
C:\Windows\system32\KERNEL32.dll
C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll
C:\Windows\system32\ntdll.dll
C:\Windows\system32\KERNELBASE.dll
C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll
C:\cygwin64\bin\cygiconv-2.dll
C:\cygwin64\bin\cygintl-8.dll
C:\cygwin64\bin\cygpcre-1.dll
這些列表包括那些可能被動態(可選的)加載的DLL?如果不是,我們怎麼能列出它們呢? – Fr0stBit
@藝術家你在說什麼?根據定義,所有動態鏈接庫都是動態的 –
並非所有DLL在程序啓動時都由程序加載程序加載。例如,一些可以在運行時通過使用諸如Windows中的LoadLibrary之類的API來加載。 – Fr0stBit