How to convert an ELF executable to C code? The generated C code need not be human-readable

前端 未结 2 1954
情话喂你
情话喂你 2021-01-17 19:58

I have an ELF file that I would like to decompile into C code, and make simple changes to the resulting C code and rebuild it into an ELF.

2条回答
  •  -上瘾入骨i
    2021-01-17 20:37

    You write a simulator for the processor, then you run the elf instructions through your simulated processor. It's generally not too much of a task because even CISC processors have relatively small, contained instruction sets that perform simple operations.

    When you've got that working, look at more efficient solutions, like outputting C code to match instructions.

提交回复
热议问题