How I can find function in shared object files using objdump and bash functions in linux?

我是研究僧i 提交于 2019-12-03 15:33:43

问题


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?

For instance, the following example is found me function func1 in mylib.so:

objdump -d mylib.so | grep func1

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.


回答1:


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.




回答2:


You can use also use,

find <path> -name "*.so" -exec nm {} \; | grep func1


来源:https://stackoverflow.com/questions/9357930/how-i-can-find-function-in-shared-object-files-using-objdump-and-bash-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!