News for hackers. Stuff that matters.
Re:A Crash Course in X86 Assembly for Reverse Engineers (201... by ant6n on Saturday December 03, 2016 @01:42PM (#13096866)
64-bit mode is kind of a strict superset of 32-bit mode. So the program can run in 64bit mode. But for example, if a program stores a pointer in memory, it's stored as a 32bit number. Once it's loaded, it gets 0-extended to a 64bit integer.

The main thing is having a differen ABI (within the program), and using the linker/memmapping to ensure that the stack, code, and a heap is in the lower 4G. Another heap can be in the 64bit space, using 64bit pointers.

edit: one could even use trickery related to the alignment of pointers (i.e. 32bit alignment) to shift values on load or access, using the fact that the lower bits of the address. This could allow 36bit addresses that cover 16GB of memory.

There are no comments on this comment yet.