Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

like image 293
G-71 Avatar asked Feb 20 '12 08:02

G-71


1 Answers

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.

like image 145
ugoren Avatar answered Sep 21 '22 00:09

ugoren