How can I find library dependencies of a Windows DLL?

Is it possible to find all of the library dependencies of a Windows DLL under Linux?

The Portable Executable (PE) format is a file format for executables and DLLs in Windows operating systems.

You may be surprised that, PE is a modified version of the Unix COFF (Common Object File Format).

You can find dependent DLLs using objdump utility with -p argument in Linux. It will print a lot of information, you need to filter DLL keyword like below:

$ objdump -p libMyCustom.dll | grep DLL
	DLL
 vma:            Hint    Time      Forward  DLL       First
	DLL Name: ADVAPI32.dll
	DLL Name: GDI32.dll
	DLL Name: KERNEL32.dll
	DLL Name: msvcrt.dll
	DLL Name: SHELL32.DLL
	DLL Name: USER32.dll
	DLL Name: WS2_32.dll
1 Like

You can also use the dependency walker http://www.dependencywalker.com/