How to list exported functions in a shared lib on Ubuntu(如何在 Ubuntu 的共享库中列出导出的函数)
问题描述
我刚刚在 Ubuntu 上构建了一个共享库,当我尝试使用该功能时,加载该库的应用程序报告找不到 'xxx' 符号.
I have just built a shared lib on Ubuntu, and when I attempt to use the function, the application that loads the library is reporting 'xxx' symbol not found.
我想检查(即列出)我的库导出的函数,以便进一步调查此问题.
I want to check (i.e. list) the functions that are exported by my library so I can investigate this issue further.
相关详情:
操作系统:Ubuntu 9.10编译器:gcc 4.4.1链接器:GNU ld 2.20
OS: Ubuntu 9.10 compiler: gcc 4.4.1 linker: GNU ld 2.20
推荐答案
试试 nm 实用程序.
Try the nm utility.
GNU nm 列出对象中的符号文件 objfile.... 如果没有目标文件被列为参数,nm 假设文件 a.out.[参考]
GNU nm lists the symbols from object files objfile.... If no object files are listed as arguments, nm assumes the file a.out. [reference]
这篇关于如何在 Ubuntu 的共享库中列出导出的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Ubuntu 的共享库中列出导出的函数


基础教程推荐
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- CString 到 char* 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 初始化列表*参数*评估顺序 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01