如何查看Linux共享库导出的函数列表? [英] How do I view the list of functions a Linux shared library is exporting?

查看:239
本文介绍了如何查看Linux共享库导出的函数列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Linux上查看共享库的导出功能。

I want to view the exported functions of a shared library on Linux.

什么命令允许我这样做?

What command allows me to do this?

(在Windows上我使用程序依赖)

(On Windows I use the program depends)

推荐答案

您需要的是 nm 及其 -D 选项:

$ nm -D /usr/lib/libopenal.so.1
.
.
.
00012ea0 T alcSetThreadContext
000140f0 T alcSuspendContext
         U atanf
         U calloc
.
.
.

导出的sumbols由 T 指示。必须从其他共享对象加载的必需符号有一个 U 。请注意,符号表不仅包括函数,还包括导出的变量。

Exported sumbols are indicated by a T. Required symbols that must be loaded from other shared objects have a U. Note that the symbol table does not include just functions, but exported variables as well.

请参阅 nm 手册页了解更多信息。

See the nm manual page for more information.

这篇关于如何查看Linux共享库导出的函数列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆