40

I have a static C library (say mylib.a) and I was wondering if it's possible to find out what functions are implemented inside that file. I don't have a corresponding header file. what I need is like the equivalent of javap for Java.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
cd1
  • 15,908
  • 12
  • 46
  • 47

2 Answers2

49

On Windows you can use dumpbin. On Linux and friends you can use nm.

James McNellis
  • 348,265
  • 75
  • 913
  • 977
36

Use nm. That will only give you the symbol names - of which most of the symbols prefixed with T will be functions. Function arguments are not retained in the binary.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
nos
  • 223,662
  • 58
  • 417
  • 506