I have code that needs to mmap
an external file into a particular memory range. How can I tell the linker to map my host code into a different range? That is, how can I tell the linker "avoid putting any section at vaddr 0x40000"?
I am doing mmap
with MAP_FIXED_NOREPLACE
, and want to ensure that this doesn't fail; e.g. no collision.
Linux, gcc (for C and for linking), nasm (for asm), 64 bit