Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28703 Discussions

Detemine what subroutines were uses in an executable

carlls
Beginner
390 Views
Greetings:

I find myself needing to know what subroutine ( only names not versions ) are used in a given exe.

Now I already to know how to do this with library and object files, I use dumpbin /symbols name.obj and do OK.

I also know that if I use SCCS ids or CVS IDENT strings I could use the what or ident command... but that means updating the source.

De-buggers have to be able to do this, so the data is there ..... any idea on how to get at the data?

Regards
Carl
0 Kudos
1 Solution
Steven_L_Intel1
Employee
390 Views
The data is not there, unless you have linked a debug executable and then the symbols will be in a separate PDB file. If you ask the linker to create a link map, you can find names in it, but there isn't a way to take some random EXE and extract routine names from it.

View solution in original post

0 Kudos
3 Replies
Steven_L_Intel1
Employee
391 Views
The data is not there, unless you have linked a debug executable and then the symbols will be in a separate PDB file. If you ask the linker to create a link map, you can find names in it, but there isn't a way to take some random EXE and extract routine names from it.
0 Kudos
jimdempseyatthecove
Honored Contributor III
390 Views

Have you tried DLLEXPORT?
I believe you can DLLEXPORT procedure names without linking to a DLL or being a DLL. The names and offsetsshould be visible in the .exe file. Someone probably has a free utility that lists the exported names.

Jim Dempsey
0 Kudos
Steven_L_Intel1
Employee
390 Views
That does work - but still requires changing the code or writing a .DEF file to define the exports. You can dump them with "dumpbin -exports" from a Fortran command prompt.
0 Kudos
Reply