summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
Commit message (Collapse)AuthorAge
...
* Revert a series of commits to MCJIT to get the build working in CMakeChandler Carruth2012-03-22
| | | | | | | | | | | | | | | (and hopefully on Windows). The bots have been down most of the day because of this, and it's not clear to me what all will be required to fix it. The commits started with r153205, then r153207, r153208, and r153221. The first commit seems to be the real culprit, but I couldn't revert a smaller number of patches. When resubmitting, r153207 and r153208 should be folded into r153205, they were simple build fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153241 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-factored RuntimeDyld.Danil Malyshev2012-03-21
| | | | | | Added ExecutionEngine/MCJIT tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153221 91177308-0d34-0410-b5e6-96231b3b80d8
* RuntimeDyldMachO has the ability to keep track ofSean Callanan2012-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | relocations (i.e., pieces of data whose addresses are referred to elsewhere in the binary image) and update the references when the section containing the relocations moves. The way this works is that there is a map from section IDs to lists of relocations. Because the relocations are associated with the section containing the data being referred to, they are updated only when the target moves. However, many data references are relative and also depend on the location of the referrer. To solve this problem, I introduced a new data structure, Referrer, which simply contains the section being referred to and the index of the relocation in that section. These referrers are associated with the source containing the reference that needs to be updated, so now regardless of which end of the relocation moves, the relocation will now be updated correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153147 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved support in RuntimeDyldMachO for generatingSean Callanan2012-03-07
| | | | | | | | | | | | code that will be relocated into another memory space. Now when relocations are resolved, the address of the relocation in the host memory (where the JIT is) is passed separately from the address that the relocation will be at in the target memory (where the code will run). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152264 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the 32-bit runtime dynamic loader to allocateSean Callanan2012-03-01
| | | | | | | | code sections when needed. It just had a conditional the wrong way around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151777 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code. Improve llvm_unreachable text. Simplify some control flow.Ahmed Charles2012-02-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix various issues (or do cleanups) found by enabling certain MSVC warnings.Ahmed Charles2012-02-13
| | | | | | | | | - Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default. - Remove misplaced llvm_unreachable. - Add static to a declaration of a function on MSVC x86 only. - Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150364 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h header to ↵Eli Bendersky2012-01-22
| | | | | | | | | | | | smaller logical headers. ELF and MachO implementations of RuntimeDyldImpl go into their own header files now. Reviewed on llvm-commits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148652 91177308-0d34-0410-b5e6-96231b3b80d8
* RuntimeDyld alignment adjustment from MachO file.Jim Grosbach2012-01-21
| | | | | | | | The MachO file stores section alignment as log2(alignment-in-bytes). The allocation routines want the raw alignment-in-bytes value, so adjust for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148604 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix inverted condition.Jim Grosbach2012-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148593 91177308-0d34-0410-b5e6-96231b3b80d8
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up.Jim Grosbach2012-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148265 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine interface to re-map addresses for engines that support it.Jim Grosbach2012-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148264 91177308-0d34-0410-b5e6-96231b3b80d8
* MCJIT handle a few more simple x86 relocations for MachO.Jim Grosbach2012-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148263 91177308-0d34-0410-b5e6-96231b3b80d8
* MCJIT support for non-function sections.Jim Grosbach2012-01-16
| | | | | | | | | | | | | | | | Move to a by-section allocation and relocation scheme. This allows better support for sections which do not contain externally visible symbols. Flesh out the relocation address vs. local storage address separation a bit more as well. Remote process JITs use this to tell the relocation resolution code where the code will live when it executes. The startFunctionBody/endFunctionBody interfaces to the JIT and the memory manager are deprecated. They'll stick around for as long as the old JIT does, but the MCJIT doesn't use them anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148258 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in stringEli Bendersky2012-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147654 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore MachO symbol flags in the upper nibble of n_desc.Jim Grosbach2011-11-01
| | | | | | They don't impact the MCJIT rtdyld, so just mask them off for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143472 91177308-0d34-0410-b5e6-96231b3b80d8
* Add to RuntimeDyld support different object formatsDanil Malyshev2011-07-13
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135037 91177308-0d34-0410-b5e6-96231b3b80d8