我怎么能在Linux中使用objdump的和bash功能查找共享目标文件的功能? [英] How I can find function in shared object files using objdump and bash functions in linux?
问题描述
我有在linux下的一个文件夹,其中包含一些共享对象文件(*。所以)。我怎么能在Linux中使用objdump的和bash功能找到共享对象文件的功能?
I've got a folder in linux, which is contained several shared object files (*.so). How I can find function in shared object files using objdump and bash functions in linux?
例如,下面的例子是发现了我在mylib.so功能 FUNC1
:
For instance, the following example is found me function func1
in mylib.so:
objdump -d mylib.so | grep func1
但我想找到 FUNC1
,其中包含共享对象文件的文件夹。我不知道bash的语言,以及如何combinate Linux终端命令。
But i want to find func1
in folder which is contained shared object files. I don't know bash language and how to combinate linux terminal commands.
推荐答案
纳米
比 objdump的
简单,对于此任务。结果纳米-A *的.so | grep的FUNC
应该工作。在 -A
标志告诉纳米
打印的文件名。
nm
is simpler than objdump
, for this task.
nm -A *.so | grep func
should work. The -A
flag tells nm
to print the file name.
这篇关于我怎么能在Linux中使用objdump的和bash功能查找共享目标文件的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!