Find out what functions a static C library has

35,805

Solution 1

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

Solution 2

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.

Share:
35,805
cd1
Author by

cd1

Updated on October 05, 2020

Comments

  • cd1
    cd1 over 3 years

    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.

  • Kemin Zhou
    Kemin Zhou over 7 years
    nm works with both dynamic (libfoo.so) and static (libbar.a) libraries