# Finding required dll's from Linux

**URL:** <https://linux-tips.com/t/finding-required-dlls-from-linux/841>\
**Category:** Programming\
**Created:** [September 25, 2021, 7:57am UTC](https://linux-tips.com/t/finding-required-dlls-from-linux/841 "2021-09-25T07:57:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![redsector](https://linux-tips.com/user_avatar/linux-tips.com/redsector/32/71_2.png) [@redsector](https://linux-tips.com/u/redsector)\
**Post date:** [September 25, 2021, 7:57am UTC](https://linux-tips.com/t/finding-required-dlls-from-linux/841/1 "2021-09-25T07:57:06Z")

</div>

It is possible to find which DLL files are needed for a windows binary or library in Linux.

To do this, you can use standard **objdump** utility if it supports **PE** format or you can install **mingw** cross compiler toolchains and run objdump within mingw:

```auto
$ objdump --private-headers my-binary.exe | grep "DLL Name"
	DLL Name: ADVAPI32.dll
	DLL Name: CRYPT32.dll
	DLL Name: KERNEL32.dll
	DLL Name: msvcrt.dll
	DLL Name: USER32.dll
	DLL Name: WS2_32.dll

```

or

```auto
$ sudo apt install mingw-w64
$ x86_64-w64-mingw32-objdump --private-headers my-binary.exe | grep "DLL Name"
	DLL Name: ADVAPI32.dll
	DLL Name: CRYPT32.dll
	DLL Name: KERNEL32.dll
	DLL Name: msvcrt.dll
	DLL Name: USER32.dll
	DLL Name: WS2_32.dll

```

You can also pipe output to a pager and look at the functions provided by a DLL or used within a binary from other DLL’s inside of Tables sections:

```auto
$ objdump -p my-binary.exe | less
...
The Import Tables (interpreted .idata section contents)
 vma: Hint Time Forward DLL First
                 Table Stamp Chain Name Thunk
 00483000 004830a0 00000000 00000000 00485570 00483a20

        DLL Name: ADVAPI32.dll
        vma: Hint/Ord Member-Name Bound-To
        4843a0 1195 CryptAcquireContextW
        4843b8 1197 CryptCreateHash
        4843ca 1198 CryptDecrypt

```

or

```auto
$ objdump -p mylibrary.dll | less
...
[Ordinal/Name Pointer] Table
        [0] getDomainStatus
        [1] utils_load
        [2] utils_unload

```
