I'm trying to generate a log of all identified symbols in a binary file. The application i'm trying to inspect is busybox. I've created a Pin Tool that successfully captures symbols (no demangling) and place them underneath the module they belong to, and worked just fine for many binaries except busybox. For example this command:
pin -t <pin-tool-shared-object> busybox -ls
Was able to generate only the following output:
MODULE busybox: .init .plt .text # eof
Not finding any of the desired symbols. Unsure of where the problem was, I tried many variations of the
nm command. The output was always the same:
$ nm -an /bin/busybox | c++filt nm: /bin/busybox: no symbol $ nm -an -D /bin/busybox | c++filt nm: /bin/busybox: no symbol $ nm -D /bin/busybox | c++filt nm: /bin/busybox: no symbol
What is happening here and how can I get a trace of the called symbols in this case (or at least a static
nm-like output of these symbols).
The full Pin tool code is found here, as it might be the problem too.
Running the tool in verbose mode
-v, that generates the sequential call graph, gives me traces like these when in busybox basic blocks:
0x404970 | CALL .plt 0x42d41f | RET 0x404970 | CALL .plt 0x42d41f | RET 0x43bcd1 | CALL .text 0x4053fb | CALL .text 0x4040d0 | CALL .plt 0x405416 | RET 0x43bcf6 | RET 0x404740 | CALL .plt
Which is nowhere near helpful. Apparently there are no exported symbols in this module.