summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h
Commit message (Collapse)AuthorAgeFilesLines
* [MCJIT] Add command-line argument to llvm-rtdyld to specify target addresses forLang Hames2014-09-041-0/+1
| | | | | | | | | sections. This allows fine-grained control of the memory layout of hypothetical target processes for testing purposes. llvm-svn: 217122
* [MCJIT] Add a 'section_addr' builtin function to RuntimeDyldChecker.Lang Hames2014-09-031-7/+22
| | | | | | | | | | The syntax of the new builtin is 'section_addr(<filename>, <section-name>)' (similar to the stub_addr builtin, but without a symbol name). It returns the base address of the given section in the given object file. This builtin makes it possible to refer to the contents of sections that cannot contain symbols, e.g. sections added by the linker itself, like __eh_frame. llvm-svn: 217010
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-3/+3
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* [MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather thanLang Hames2014-07-291-1/+1
| | | | | | | | | | full paths for its first argument. This allows us to remove the annoying sed lines in the test cases, and write direct references to file names in stub_addr calls (rather than <filename> placeholders). llvm-svn: 214211
* ExecutionEngine: remove a stray semicolonSaleem Abdulrasool2014-07-231-1/+1
| | | | | | Detected via GCC 4.8 [-Wpedantic]. llvm-svn: 213776
* [MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.Lang Hames2014-07-221-0/+60
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. llvm-svn: 213698
OpenPOWER on IntegriCloud