是否可以在 GCC 命令行中列出任何库/头文件中可用的所有库函数? 是否有类似 JAVAP 之类的可用于 Java 的程序? 谢谢。
最佳答案
您可以使用 objdump 列出共享库(或可执行文件)中的符号:
$objdump -T /usr/lib/libclang.so
<...snipped...>
0000000000124150 g DF .text 00000000000000c1 Base clang_reparseTranslationUnit
000000000010fe40 g DF .text 0000000000000021 Base clang_getNullRange
0000000000135760 g DF .text 000000000000009f Base clang_getPointeeType
0000000000124290 g DF .text 0000000000000289 Base clang_parseTranslationUnit
000000000012b790 g DF .text 0000000000000935 Base clang_findReferencesInFile
0000000000110b80 g DF .text 000000000000001c Base clang_getRangeEnd
0000000000127d20 g DF .text 0000000000000022 Base clang_disposeCodeCompleteResults
0000000000135e10 g DF .text 0000000000000037 Base clang_isPODType
000000000010f870 g DF .text 0000000000000025 Base clang_getTranslationUnitCursor 0000000000129b50 g DF .text 00000000000002c1 Base clang_getDiagnosticOption
如您所见,它列出了不同的符号及其相对地址。
关于c++ - 在 GCC 中列出库函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17493932/