I have a binary file compiled using gcc of a simple c program. I'm writing my own dis-assembler, I able to read ELF header and other header from ELF files.
I'm reading ".text"section from ELF binary file. And trying to convert the opecode into mnemonics/assembly instruction.
How to convert raw opcode/machine code into mnemonics/assembly instruction?? C source code is:
#include <stdio.h>
int main()
{
int i = 10;
int j = 22 + i;
return 0;
}
Following is the example of raw opcode i have received after reading ELF file:
55 ffffff89 ffffffe5 ffffff83 ffffffec 20 ffffffc7 45 ffffffec 3 ffffffc7 45
fffffff0 41 ffffffc7 45 fffffff4 8 ffffffc7 45 fffffff8 21 ffffff8b 45
ffffffec ffffff83 ffffffc0 16 ffffff89 45 fffffffc ffffffb8 ffffffc9 ffffffc3