I'm playing around with Hopper and am looking at the disassembly of a binary that otool
reports as having the PIE
flag.
It's my understanding that as a result, the executable base address will be randomized, and so jumps have to be relative to the current instruction pointer.
However, looking at the output of this PIE binary in Hopper, I see absolute jumps like so:
00000001000021df mov rbx, rax
00000001000021e2 test rbx, rbx
00000001000021e5 je 0x1000021c0
Is Hopper just translating the relative jumps into an absolute jump assuming the text segment is loaded at the standard virtual address of 0x100000000
, or am I missing something conceptual with regards to how position independent executables work?
74 D9
@Megabeets . I see that this corresponds to a relative jump according to the intel reference. I'm guessing then that Hopper is just converting the relative jump into its equivalent for easy viewing?