其中一个将做到这一点。请注意,您可以忽略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