llvm-6502/tools
Lang Hames daf061cf05 [MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.
This patch introduces a 'stub_addr' builtin that can be used to find the address
of the stub for a given (<file>, <section>, <symbol>) tuple. This address can be
used both to verify the contents of stubs (by loading from the returned address)
and to verify references to stubs (by comparing against the returned address).

Example (1) - Verifying stub contents:

Load 8 bytes (assuming a 64-bit target) from the stub for 'x' in the __text
section of f.o, and compare that value against the addres of 'x'.

# rtdyld-check: *{8}(stub_addr(f.o, __text, x) = x

Example (2) - Verifying references to stubs:

Decode the immediate of the instruction at label 'l', and verify that it's
equal to the offset from the next instruction's PC to the stub for 'y' in the
__text section of f.o (i.e. it's the correct PC-rel difference).

# rtdyld-check: decode_operand(l, 4) = stub_addr(f.o, __text, y) - next_pc(l)
l:
        movq    y@GOTPCREL(%rip), %rax

Since stub inspection requires cooperation with RuntimeDyldImpl this patch
pimpl-ifies RuntimeDyldChecker. Its implementation is moved in to a new class,
RuntimeDyldCheckerImpl, that has access to the definition of RuntimeDyldImpl.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213698 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 22:47:39 +00:00
..
bugpoint Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
bugpoint-passes [CMake] Add LLVM_LINK_COMPONENTS to loadable modules, LLVMHello and BugpointPasses, on Win32. 2014-07-13 13:36:48 +00:00
gold Use raw_fd_ostream instead of std::ofstream. 2014-07-07 20:34:51 +00:00
llc
lli [CMake] Update libdeps. 2014-07-14 05:01:53 +00:00
llvm-ar [CMake] Update libdeps. 2014-07-14 05:01:53 +00:00
llvm-as
llvm-bcanalyzer Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
llvm-c-test
llvm-config
llvm-cov Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
llvm-diff Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
llvm-dis
llvm-dwarfdump Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
llvm-extract
llvm-jitlistener
llvm-link
llvm-lto Prune Redundant libdeps in CMake's target_link_libraries and LLVMBuild.txt. 2014-07-15 11:37:03 +00:00
llvm-mc Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
llvm-mcmarkup Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
llvm-nm Correct the ownership passing semantics of object::createBinary and make them explicit in the type system. 2014-07-21 16:26:24 +00:00
llvm-objdump llvm-objdump: Handle BSS sections larger than the object file 2014-07-14 16:20:14 +00:00
llvm-profdata Support: Fix option handling when using cl::Required with aliasopt 2014-07-14 20:53:57 +00:00
llvm-readobj [Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj, 2014-07-13 15:28:54 +00:00
llvm-rtdyld [MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework. 2014-07-22 22:47:39 +00:00
llvm-shlib
llvm-size
llvm-stress
llvm-symbolizer Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
lto Update the MemoryBuffer API to use ErrorOr. 2014-07-06 17:43:13 +00:00
macho-dump
msbuild
obj2yaml Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
opt
yaml2obj [CMake] Update libdeps. 2014-07-14 05:01:53 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile