N
N
NeffiseX2021-06-20 20:33:20
C++ / C#
NeffiseX, 2021-06-20 20:33:20

How to compile .so file to .c?

I found a .so file and I need to compile to .c
But I don't know how to compile the files back.
Thanks for any answer!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
CityCat4, 2021-06-20
@CityCat4

I found a .so file and need to compile to .c

FAQ to do-ta? It's like "I found a pound of minced meat and I need to get back the meat it's made of"? The operation, the reverse of compilation (and compilation, dude, is getting an executable module from the source code) - is called - all of a sudden - decompilation. And it is possible for .c files in a very primitive form only if debugging information is "forgotten" in the module. In all other cases, it is simply impossible :D

A
Alexander Ananiev, 2021-06-20
@SaNNy32

In general, no way. There are some decompilers, for example, as part of IDA Pro, but they only restore the logic of the code, not the source code.

O
old2ev, 2021-06-21
@old2ev

You definitely won’t be able to get the C code, the maximum that you can do is disassemble ( https://ru.wikipedia.org/wiki/Objdump ) and get a huge assembler text at the output, and then rewrite the algorithm in C by going through the labels.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question