Dumping symbols from a library

When you need to dump symbols from a dylib on Mac OS or a DLL on Windows, you can use the following commands to do so:

Mac OS

nm -m mySpecialLibrary.dylib

Windows

dumpbin /exports mySpecialLibrary.dll

Now sometimes, you have have a lot of symbols in one library, or you may want to find one particular symbol. On the Mac, that’s pretty simple to do. Just use the grep command to find the symbol you are looking for:

nm -m mySpecialLibrary.dylib | grep someSpecialFunction

On the PC, you can dump your symbols to a file so that you can use a text editor like Notepad++ to search for symbols:

dumpbin /exports mySpecialLibrary.dll > c:\MyProjectFolder\mySpecialLibrarySymbols.txt

Leave a Reply

Your email address will not be published. Required fields are marked *