As an assignment for a security class, I am trying to use __asm__('jmp 0xbffff994'); in my code, but when I disassemble things in gdb, the instruction is changed to jmp 0xc8047e2a. Any idea why and how can I jump to a particular address?
As an assignment for a security class, I am trying to use __asm__(jmp 0xbffff994);
Share
Probably because it’s a jumping to a relative address, and the linker or loader has moved your code. Try putting the address into a variable, and then do:
or alternatively: