[MCJIT] Add options to llvm-rtdyld to describe a phony target address space for
authorLang Hames <lhames@gmail.com>
Tue, 29 Jul 2014 23:43:13 +0000 (23:43 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 29 Jul 2014 23:43:13 +0000 (23:43 +0000)
commit9cb7353e0b5a4c6a5f240fc99cb79e45dd65d168
treedc4ada8fd9998cae3a54d7933777f812329f7b7a
parent245076825158af3e8682c77856a2ae02de79dfb9
[MCJIT] Add options to llvm-rtdyld to describe a phony target address space for
use in -verify mode.

This patch adds three hidden command line options to llvm-rtdyld:

 -target-addr-start <start-addr> : Specify the start of the virtual address
                                   space on the phony target.

 -target-addr-end   <end-addr>   : Specify the end of the virtual address space
                                   on the phony target.

 -target-section-sep <sep>       : Specify the separation (in bytes) between the
                                   end of one section and the start of the next.

These options automatically default to sane values for the target platform. In
particular, they allow narrow (e.g. 32-bit, 16-bit) targets to be tested from
wider (e.g. 64-bit, 32-bit) hosts without overflowing pointers.

The section separation option defaults to zero, but can be set to a large number
(e.g. 1 << 32) to force large separations between sections in order to
stress-test large-code-model code.

llvm-svn: 214255
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp