[JITLink] Add a -slab-address option to llvm-jitlink.
authorLang Hames <lhames@gmail.com>
Tue, 3 Mar 2020 22:18:12 +0000 (14:18 -0800)
committerLang Hames <lhames@gmail.com>
Tue, 3 Mar 2020 22:25:51 +0000 (14:25 -0800)
commit14ac84e5c56e115d57eef01373f1f97267b38ef8
tree866d64fe79ec7ad5adbde1ef36b15c7072c315cf
parent736fef97c7ac4113388fc56db10c599fb4d2f074
[JITLink] Add a -slab-address option to llvm-jitlink.

This option can be used to for JITLink to link as-if the target memory slab were
allocated at a specific start address. This can be used to both verify that
cross-address space linking is working correctly, and to ensure that certain
address-sensitive optimizations (e.g. GOT and stub elimination) either do or do
not fire, depending on the requirements of the test case.

This argument is only valid for testing in conjunction with -noexec -slab-alloc,
and will produce an error if used without those arguments.
llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s
llvm/tools/llvm-jitlink/llvm-jitlink.cpp