So basically I am using
objdump on 32 bit x86 Linux, disassembling some static linked binary compiled by
In the disassembled asm code, I find this:
80ade23: 74 01 je 0x80ade26 80ade25: f0 0f c1 16 lock xadd %edx,(%esi) // lock 80ade29: 89 54 24 14 mov %edx,0x14(%esp) 80ade2d: 8b 54 24 14 mov 0x14(%esp),%edx 80ade31: 3b 15 f0 0e 0f 08 cmp 0x80f0ef0,%edx 80ade37: 73 75 jae 0x80adeae 80ade39: 65 83 3d 0c 00 00 00 cmpl $0x0,%gs:0xc 80ade40: 00 80ade41: 74 01 je 0x80ade44 80ade43: f0 0f c1 0d dc 0e 0f lock xadd %ecx,0x80f0edc // lock 80ade4a: 08
So basically, in my understanding,
lock is a prefix of x86 asm opcode, which is legal here.
and it seems that
je jump into the position right after
so here are my questions:
Is the disassemble results from
objdumpcorrect? It is rare to see
objdumpgenerate this kind of "jump into instructions" asm code..(anyway, I am new to reverse engineering, so... :) )
Then how to adjust it to make it re-assemblable?
I tried to change it in this way and re-assemble it using
it can pass the assemble process, but basically I really don't know if it is a correct way or not.
je S_0x80ade26 lock S_0x80ade26: xadd %edx,(%esi) // lock