I am working on previously developed software and source code is compiled as linux shared libraries (.so) and source code is not present. Is there any tool which can extract source code from the linux shared libraries?
Thanks, Ravi
There isn't. Once you compile your code there is no trace of it left in the binary, only machine code. Some may mention decompilers but those don't extract the source, they analyze the executable and produce some source that should have the same effect as the original one did.
so (shared object) over . a library is that they are linked during the runtime i.e. after creation of your .o file -o option in gcc. So, if there's any change in . so file, you don't need to recompile your main program. But make sure that your main program is linked to the new .
The source is not part of binary files. You can decompile the binary code, but it will not be the original source code, and will not really be readable.
There isn't. Once you compile your code there is no trace of it left in the binary, only machine code.
Some may mention decompilers but those don't extract the source, they analyze the executable and produce some source that should have the same effect as the original one did.
You can try disassembling the object code and get the machine code mnemonics.
objdump -D --disassembler-options intel sjt.o
to get Intel syntax assembly
objdump -D --disassembler-options att sjt.o
or objdump -D sjt.o
to get AT&T syntax assembly
But the original source code could never be found. You might try to reverse the process by studying and reconstruct the sections. It would be hell pain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With