This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Extract static object from dynamic one


Hello,

I've been wondering about a relatively simple question for which there seems to be no obvious answer - am I overlooking something?

Suppose I have a dynamic C library libfoo.so (or foo.dll) along with headers in foo.h. Is it possible to build from the binary a static library libfoo.a?

I'm thinking that this should be easy, since I know all the function signatures and entry points in the binary; is there some way (maybe with objcopy or objdump?) in which I can extract the binary code for a specific function?

Thank you very much,

Thomas K.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]