I'm dealing with a large executable, for which I do not have sources (long story).
I'd like to extract the binary code of several functions from it -- and try to call them from my own program. The functions I'm looking for were all compiled from the same source-file (using gcc on Linux), if it matters.
I can see the function's binary code using objdump. Is there any way I could convince the tool to dump a functions' binary code -- with nothing else and without disassembling?
Basically, if the C-file, where the functions were defined, was called foo.c, I want to get foo.o (I'd actually prefer foo.So, but that's not going to exist in an executable). Can it be done with objdump, readelf or some such?
The functions are self-contained, if it matters.
Thanks!