]> granicus.if.org Git - llvm/commit
Make llvm-rtdlyd -check preserve automatic address mappings made by RuntimeDyld.
authorLang Hames <lhames@gmail.com>
Sun, 7 May 2017 17:19:53 +0000 (17:19 +0000)
committerLang Hames <lhames@gmail.com>
Sun, 7 May 2017 17:19:53 +0000 (17:19 +0000)
commite3f371483fa79148cc9c593971feaaa0aeff939f
tree29f165c81b8f4ecd835d72b18a3f4f0170fd2f04
parent038bc52dc9aa7bf3c3c46dcd031c01beebf73291
Make llvm-rtdlyd -check preserve automatic address mappings made by RuntimeDyld.

Currently llvm-rtdyld in -check mode will map sections to back-to-back 4k
aligned slabs starting at 0x1000. Automatically remapping sections by default is
helpful because it quickly exposes relocation bugs due to use of local addresses
rather than load addresses (these would silently pass if the load address was
not remapped). These mappings can be explicitly overridden on a per-section
basis using llvm-rtdlyd's -map-section option. This patch extends this scheme to
also preserve any mappings made by RuntimeDyld itself. Preserving RuntimeDyld's
automatic mappings allows us to write test cases to verify that these automatic
mappings have been applied.

This will allow the fix in https://reviews.llvm.org/D32899 to be tested with
llvm-rtdyld -check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302372 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ExecutionEngine/RuntimeDyldChecker.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h
tools/llvm-rtdyld/llvm-rtdyld.cpp