Use dumpbin to show External symbol(UNDEF) for DLL?
Asked Answered
A

1

5

We all know we could use dumpbin for .obj file to show all the symbols including external ones.

dumpbin /symbols ExternCTest.ob
00F 00000000 UNDEF  notype ()    External     | ?foo@@YAHH@Z (int __cdecl foo(int))

But I am wondering how could I do this for DLL ? I have also tried dumpbin /exports as well as dependency walker but it's NOT showing external symbols.

How should I do it ?

Thanks

Alderney answered 10/12, 2012 at 15:29 Comment(6)
/exports shows you what the DLL exports. /Imports shows you what external dependencies the DLL has, symbols that it needs to resolve by loading other DLLs. The equivalent of your snippet. If you get no output from /exports then you forgot to export functions with __declspec(dllexport)Examinee
Thanks! is it doable from dependency walker for showing external symbol? I am trying to do analysis on a PC doesn't have Visual studio installed which probably mean dumpbin might not work ?Alderney
What problem are you trying to solve?Examinee
Go to a separately standalone PC trying to check which component is out of date/sync as it's trying to access a external link that doesn't exist anymore. I can run Dependency walker there, probably not dumpbin?Alderney
Clearly you care about /imports here. Maybe you can diagnose it with depends.exe, it depends. It could be a dynamically loaded DLL or a COM component. You'll need to use its Profile option to see those. SysInternals' ProcMon utility shows everything.Examinee
Looks like DW does the job but how does ProcMon do the trick ? I normally use it for file/reg monitoring...Alderney
S
10

The command line argument you are looking for is /imports. This will show all external symbols referenced by the DLL.

Suspensor answered 10/12, 2012 at 16:49 Comment(2)
Thanks! is it doable from dependency walker for showing external symbol? I am trying to do analysis on a PC doesn't have Visual studio installed which probably mean dumpbin might not work ?Alderney
Yes, Dependency Walker will show both imports and exports for a PE file. It should also work just fine without VS installed (it's available as a separate app).Suspensor

© 2022 - 2024 — McMap. All rights reserved.