summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
Commit message (Collapse)AuthorAgeFilesLines
* RuntimeDyld cleanup:Eli Bendersky2012-05-011-8/+18
| | | | | | | | | | | - Improved parameter names for clarity - Added comments - emitCommonSymbols should return void because its return value is not being used anywhere - Attempt to reduce the usage of the RelocationValueRef type. Restricts it for a single goal and may serve as a step for eventual removal. llvm-svn: 155908
* RuntimeDyld code cleanup:Eli Bendersky2012-05-011-4/+4
| | | | | | | | | - There's no point having a different type for the local and global symbol tables. - Renamed SymbolTable to GlobalSymbolTable to clarify the intention - Improved const correctness where relevant llvm-svn: 155898
* Code cleanup in RuntimeDyld:Eli Bendersky2012-04-301-34/+33
| | | | | | | | | - Add comments - Change field names to be more reasonable - Fix indentation and naming to conform to coding conventions - Remove unnecessary includes / replace them by forward declatations llvm-svn: 155815
* Implement GDB integration for source level debugging of code JITed usingPreston Gurd2012-04-161-2/+2
| | | | | | | | | | | | | | | the MCJIT execution engine. The GDB JIT debugging integration support works by registering a loaded object image with a pre-defined function that GDB will monitor if GDB is attached. GDB integration support is implemented for ELF only at this time. This integration requires GDB version 7.0 or newer. Patch by Andy Kaylor! llvm-svn: 154868
* Re-factored RuntimeDyLd:Danil Malyshev2012-03-301-516/+111
| | | | | | | | | | | | | | | 1. The main works will made in the RuntimeDyLdImpl with uses the ObjectFile class. RuntimeDyLdMachO and RuntimeDyLdELF now only parses relocations and resolve it. This is allows to make improvements of the RuntimeDyLd more easily. In addition the support for COFF can be easily added. 2. Added ARM relocations to RuntimeDyLdELF. 3. Added support for stub functions for the ARM, allowing to do a long branch. 4. Added support for external functions that are not loaded from the object files, but can be loaded from external libraries. Now MCJIT can correctly execute the code containing the printf, putc, and etc. 5. The sections emitted instead functions, thanks Jim Grosbach. MemoryManager.startFunctionBody() and MemoryManager.endFunctionBody() have been removed. 6. MCJITMemoryManager.allocateDataSection() and MCJITMemoryManager. allocateCodeSection() used JMM->allocateSpace() instead of JMM->allocateCodeSection() and JMM->allocateDataSection(), because I got an error: "Cannot allocate an allocated block!" with object file contains more than one code or data sections. llvm-svn: 153754
* Revert r153694. It was causing failures in the buildbots.Bill Wendling2012-03-291-111/+516
| | | | llvm-svn: 153701
* Re-factored RuntimeDyld.Danil Malyshev2012-03-291-516/+111
| | | | | | Added ExecutionEngine/MCJIT tests. llvm-svn: 153694
* Made RuntimeDyldMachO support vanilla i386Sean Callanan2012-03-261-0/+37
| | | | | | | | | relocations. The algorithm is the same as that for x86_64. Scattered relocations, a feature present in i386 but not on x86_64, are not yet supported. llvm-svn: 153466
* Revert a series of commits to MCJIT to get the build working in CMakeChandler Carruth2012-03-221-108/+514
| | | | | | | | | | | | | | | (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. llvm-svn: 153241
* Re-factored RuntimeDyld.Danil Malyshev2012-03-211-514/+108
| | | | | | Added ExecutionEngine/MCJIT tests. llvm-svn: 153221
* RuntimeDyldMachO has the ability to keep track ofSean Callanan2012-03-201-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 153147
* Improved support in RuntimeDyldMachO for generatingSean Callanan2012-03-071-16/+48
| | | | | | | | | | | 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). llvm-svn: 152264
* Fixed the 32-bit runtime dynamic loader to allocateSean Callanan2012-03-011-1/+1
| | | | | | | code sections when needed. It just had a conditional the wrong way around. llvm-svn: 151777
* Remove dead code. Improve llvm_unreachable text. Simplify some control flow.Ahmed Charles2012-02-191-1/+0
| | | | llvm-svn: 150918
* Fix various issues (or do cleanups) found by enabling certain MSVC warnings.Ahmed Charles2012-02-131-1/+0
| | | | | | | | | - 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. llvm-svn: 150364
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-1/+1
| | | | llvm-svn: 149967
* Split the lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h header to ↵Eli Bendersky2012-01-221-1/+1
| | | | | | | | | | smaller logical headers. ELF and MachO implementations of RuntimeDyldImpl go into their own header files now. Reviewed on llvm-commits llvm-svn: 148652
* RuntimeDyld alignment adjustment from MachO file.Jim Grosbach2012-01-211-2/+4
| | | | | | | | 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. llvm-svn: 148604
* Fix inverted condition.Jim Grosbach2012-01-201-1/+1
| | | | llvm-svn: 148593
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* Tidy up.Jim Grosbach2012-01-161-1/+1
| | | | llvm-svn: 148265
* ExecutionEngine interface to re-map addresses for engines that support it.Jim Grosbach2012-01-161-0/+2
| | | | llvm-svn: 148264
* MCJIT handle a few more simple x86 relocations for MachO.Jim Grosbach2012-01-161-4/+5
| | | | llvm-svn: 148263
* MCJIT support for non-function sections.Jim Grosbach2012-01-161-213/+281
| | | | | | | | | | | | | | | | 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. llvm-svn: 148258
* Fix typo in stringEli Bendersky2012-01-061-1/+1
| | | | llvm-svn: 147654
* Ignore MachO symbol flags in the upper nibble of n_desc.Jim Grosbach2011-11-011-2/+4
| | | | | | They don't impact the MCJIT rtdyld, so just mask them off for now. llvm-svn: 143472
* Add to RuntimeDyld support different object formatsDanil Malyshev2011-07-131-0/+524
llvm-svn: 135037
OpenPOWER on IntegriCloud