GCC/X86, Problems with relative jumps
- by Ian Kelly
I'm trying to do a relative jump in x86 assembly, however I can not get it to work. It seems that for some reason my jump keeps getting rewritten as an absolute jump or something.
A simple example program for what I'm trying to do is this:
.global main
main:
jmp 0x4
ret
Since the jmp instruction is 4 bytes long and a relative jump is…