0

I have an issue I don't know how to solve.

I have ever written a program (Python script) which returns a list of dynamic libraries with all the executables using them. (My script uses the ldd utility).

Now, I'd like to do a program which would return a list of functions of dynamic libraries with all the executables using them. But how can I do that ??

(I think the main problem is that libraries are build and to do that I need source code, right ?)

Thanks !! JC

JohnCage
  • 37
  • 5
  • The craziest thing to do is to google the names of these libraries and to extract functions' names from the docs. It could be a sort of joke but why not try – ForceBru May 13 '15 at 12:16
  • If I understood you correctly, try googling 'dll' instead. – Zach P May 13 '15 at 12:19

1 Answers1

0

If you have ldd you should also have nm. This will list symbols in a binary, executable or shared object alike assuming symbols are included. This tool reports the function names indicating both local and external dependency information. You should be able to use this to do what you want.

pedwards
  • 423
  • 2
  • 12
  • Yes I tried nm. It is useful for executables which have symbols, but for others like /bin/ls, it is usefulness. For executables which have no symbol, may be I must have source code... – JohnCage May 13 '15 at 12:52
  • No symbols means searching source code. Good luck with that! :( – pedwards May 13 '15 at 12:54
  • @JohnCage Even stripped executables have symbols. You just need to use `nm -D` on them. You *should* be using `nm -D` in the first place (even for non-stripped binaries) because `nm` will show you the symbols which are not actually exported from the binary (and thus can't be used from outside of it). – Employed Russian May 14 '15 at 04:02