summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
Commit message (Collapse)AuthorAgeFilesLines
...
* [C++] Use 'nullptr'.Craig Topper2014-04-281-2/+3
| | | | llvm-svn: 207394
* [RuntimeDyld] Fix comment for previous commit (r204439)Juergen Ributzka2014-03-211-2/+4
| | | | llvm-svn: 204508
* [RuntimeDyld] clang-format files.Juergen Ributzka2014-03-211-49/+43
| | | | llvm-svn: 204507
* [RuntimeDyld] Allow processRelocationRef to process more than one relocation ↵Juergen Ributzka2014-03-211-7/+6
| | | | | | | | | | | | | entry at a time. Some targets require more than one relocation entry to perform a relocation. This change allows processRelocationRef to process more than one relocation entry at a time by passing the relocation iterator itself instead of just the relocation entry. Related to <rdar://problem/16199095> llvm-svn: 204439
* Add an option to MCJIT to have it forward all sections to theLang Hames2014-03-201-1/+10
| | | | | | | | | | | | | | | | | | | | | | RTDyldMemoryManager, regardless of whether it thinks they're "required for execution". Currently, RuntimeDyld only passes sections that are "required for execution" to the RTDyldMemoryManager, and takes "required for execution" to mean exactly "contains symbols or relocations". There are two problems with this: (1) It can drop sections with anonymous data that is referenced by code. (2) It leaves the JIT client no way to inspect interesting sections that aren't actually required to run the program (e.g dwarf sections). A test case is still in the works. Future work: We may want to replace this with a generic section filtering mechanism, but that will require more consideration. For now, this flag at least allows clients to volunteer to do the filtering themselves. Fixes <rdar://problem/15177691>. llvm-svn: 204398
* Make createObjectImage and createObjectImageFromFile static methods on theLang Hames2014-03-081-8/+1
| | | | | | | | relevant subclasses of RuntimeDyldImpl. This allows construction of RuntimeDyldImpl instances to be deferred until after the target architecture is known. llvm-svn: 203352
* Extend RTDyld API to enable optionally precomputing the total amount of memoryLang Hames2014-02-121-0/+9
| | | | | | | | | | | | | | | | | | required for all sections in a module. This can be useful when targets or code-models place strict requirements on how sections must be laid out in memory. If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return true then the JIT will call the following method on the memory manager, which can be used to preallocate the necessary memory. void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize, uintptr_t DataSizeRO, uintptr_t DataSizeRW) Patch by Vaidas Gasiunas. Thanks very much Viadas! llvm-svn: 201259
* Re-apply r196639: Add support for archives and object file caching under MCJIT.Lang Hames2014-01-081-0/+7
| | | | | | | | | I believe the bot failures on linux systems were due to overestimating the alignment of object-files within archives, which are only guaranteed to be two-byte aligned. I have reduced the alignment in RuntimeDyldELF::createObjectImageFromFile accordingly. llvm-svn: 198737
* Whitespace cleanups.NAKAMURA Takumi2013-12-071-2/+1
| | | | llvm-svn: 196654
* Revert r196639 while I investigate a bot failure.Lang Hames2013-12-071-7/+0
| | | | llvm-svn: 196641
* Add support for archives and object file caching under MCJIT.Lang Hames2013-12-071-0/+7
| | | | | | Patch by Andy Kaylor, with minor edits to resolve merge conflicts. llvm-svn: 196639
* Improving MCJIT/RuntimeDyld thread safetyAndrew Kaylor2013-10-211-0/+13
| | | | llvm-svn: 193094
* Avoid duplicate search by reusing the iterator.Yaron Keren2013-10-191-4/+6
| | | | llvm-svn: 193034
* Adding support for deregistering EH frames with MCJIT.Andrew Kaylor2013-10-161-0/+2
| | | | | | Patch by Yaron Keren llvm-svn: 192753
* Separating ELF and MachO stub info functions for RuntimeDyldAndrew Kaylor2013-10-151-23/+2
| | | | llvm-svn: 192737
* Fixing some host==target assumptions in RuntimeDyldAndrew Kaylor2013-10-151-3/+4
| | | | llvm-svn: 192732
* Adding multiple object support to MCJIT EH frame handlingAndrew Kaylor2013-10-111-2/+5
| | | | llvm-svn: 192504
* memcmp is not a valid way to compare structs with padding in them.Benjamin Kramer2013-08-201-2/+9
| | | | llvm-svn: 188778
* Adding PIC support for ELF on x86_64 platformsAndrew Kaylor2013-08-191-7/+24
| | | | llvm-svn: 188726
* [PowerPC] Support powerpc64le as a syntax-checking target.Bill Schmidt2013-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch provides basic support for powerpc64le as an LLVM target. However, use of this target will not actually generate little-endian code. Instead, use of the target will cause the correct little-endian built-in defines to be generated, so that code that tests for __LITTLE_ENDIAN__, for example, will be correctly parsed for syntax-only testing. Code generation will otherwise be the same as powerpc64 (big-endian), for now. The patch leaves open the possibility of creating a little-endian PowerPC64 back end, but there is no immediate intent to create such a thing. The LLVM portions of this patch simply add ppc64le coverage everywhere that ppc64 coverage currently exists. There is nothing of any import worth testing until such time as little-endian code generation is implemented. In the corresponding Clang patch, there is a new test case variant to ensure that correct built-in defines for little-endian code are generated. llvm-svn: 187179
* Add EH support to the MCJIT.Rafael Espindola2013-05-051-3/+7
| | | | | | | | | This gets exception handling working on ELF and Macho (x86-64 at least). Other than the EH frame registration, this patch also implements support for GOT relocations which are used to locate the personality function on MachO. llvm-svn: 181167
* AArch64: add stubs to support long function calls on MCJITTim Northover2013-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | As with global accesses, external functions could exist anywhere in memory. Therefore the stub must create a complete 64-bit address. This patch implements the fragment as (roughly): movz x16, #:abs_g3:somefunc movk x16, #:abs_g2_nc:somefunc movk x16, #:abs_g1_nc:somefunc movk x16, #:abs_g0_nc:somefunc br x16 In principle we could save 4 bytes by using a literal-load instead, but it is unclear that would be more efficient and can only be tested when real hardware is readily available. This allows (for example) the MCJIT test 2003-05-07-ArgumentTest to pass on AArch64. llvm-svn: 181133
* [SystemZ] Add MCJIT supportRichard Sandiford2013-05-031-0/+9
| | | | | | | | Another step towards reinstating the SystemZ backend. I'll commit the configure changes separately (TARGET_HAS_JIT etc.), then commit a patch to enable the MCJIT tests on SystemZ. llvm-svn: 181015
* Add getSymbolAlignment to the ObjectFile interface.Rafael Espindola2013-04-291-7/+0
| | | | | | | | | | | | | For regular object files this is only meaningful for common symbols. An object file format with direct support for atoms should be able to provide alignment information for all symbols. This replaces getCommonSymbolAlignment and fixes test-common-symbols-alignment.ll on darwin. This also includes a fix to MachOObjectFile::getSymbolFlags. It was marking undefined symbols as common (already tested by existing mcjit tests now that it is used). llvm-svn: 180736
* Update the documentation.Rafael Espindola2013-04-291-5/+1
| | | | llvm-svn: 180725
* Use a RelocationRef instead of a relocation_iterator.Rafael Espindola2013-04-291-1/+1
| | | | | | No functionality change. llvm-svn: 180723
* Propagate relocation info to resolveRelocation.Rafael Espindola2013-04-291-7/+14
| | | | | | This gets most of the MCJITs tests passing with MachO. llvm-svn: 180716
* Replace ObjRelocationInfo with relocation_iterator.Rafael Espindola2013-04-291-13/+2
| | | | | | | | | | | For MachO we need information that is not represented in ObjRelocationInfo. Instead of copying the bits we think are needed from a relocation_iterator, just pass the relocation_iterator down to the format specific functions. No functionality change yet as we still drop the information once processRelocationRef returns. llvm-svn: 180711
* Make the host endianness check an integer constant expression.Rafael Espindola2013-04-151-3/+3
| | | | | | | | | | | | | | | I will remove the isBigEndianHost function once I update clang. The ifdef logic is designed to * not use configure/cmake to avoid breaking -arch i686 -arch ppc. * default to little endian * be as small as possible It looks like sys/endian.h is the preferred header on most modern BSD systems, but it is better to change this in a followup patch as machine/endian.h is available on FreeBSD, OpenBSD, NetBSD and OS X. llvm-svn: 179527
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-041-2/+2
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* RuntimeDyld: Fix up r169178. MSVC doesn't like "or".NAKAMURA Takumi2012-12-041-1/+1
| | | | llvm-svn: 169183
* Runtime dynamic linker for MCJIT should support MIPS BigEndian architecture.Akira Hatanaka2012-12-031-1/+1
| | | | | | | | | This small change adds support for that. It will make all MCJIT tests pass in make-check on BigEndian platforms. Patch by Petar Jovanovic. llvm-svn: 169178
* Change resolveRelocation parameters so the relocations can find placeholder ↵Andrew Kaylor2012-11-021-6/+4
| | | | | | | | values in the original object buffer. Some ELF relocations require adding the a value to the original contents of the object buffer at the specified location. In order to properly handle multiple applications of a relocation, the RuntimeDyld code should be grabbing the original value from the object buffer and writing a new value into the loaded section buffer. This patch changes the parameters passed to resolveRelocations to accommodate this need. llvm-svn: 167304
* Make use of common-symbol alignment info in ELF loader.Tim Northover2012-10-291-2/+11
| | | | | | Patch by Amara Emerson. llvm-svn: 166919
* PowerPC: Initial support for PowerPC64 MCJITAdhemerval Zanella2012-10-251-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds initial support for MCJIT for PPC64-elf-abi. The TOC relocation and ODP handling is implemented. It fixes the following ExecutionEngine testcases: ExecutionEngine/2003-01-04-ArgumentBug.ll ExecutionEngine/2003-01-04-LoopTest.ll ExecutionEngine/2003-01-04-PhiTest.ll ExecutionEngine/2003-01-09-SARTest.ll ExecutionEngine/2003-01-10-FUCOM.ll ExecutionEngine/2003-01-15-AlignmentTest.ll ExecutionEngine/2003-05-11-PHIRegAllocBug.ll ExecutionEngine/2003-06-04-bzip2-bug.ll ExecutionEngine/2003-06-05-PHIBug.ll ExecutionEngine/2003-08-15-AllocaAssertion.ll ExecutionEngine/2003-08-21-EnvironmentTest.ll ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll ExecutionEngine/simplesttest.ll ExecutionEngine/simpletest.ll ExecutionEngine/stubs.ll ExecutionEngine/test-arith.ll ExecutionEngine/test-branch.ll ExecutionEngine/test-call-no-external-funcs.ll ExecutionEngine/test-cast.ll ExecutionEngine/test-common-symbols.ll ExecutionEngine/test-constantexpr.ll ExecutionEngine/test-fp-no-external-funcs.ll ExecutionEngine/test-fp.ll ExecutionEngine/test-global-init-nonzero.ll ExecutionEngine/test-global.ll ExecutionEngine/test-loadstore.ll ExecutionEngine/test-local.ll ExecutionEngine/test-logical.ll ExecutionEngine/test-loop.ll ExecutionEngine/test-phi.ll ExecutionEngine/test-ret.ll ExecutionEngine/test-return.ll ExecutionEngine/test-setcond-fp.ll ExecutionEngine/test-setcond-int.ll ExecutionEngine/test-shift.ll llvm-svn: 166678
* Clean-up of memory buffer and object ownership model in MCJITAndrew Kaylor2012-10-021-12/+5
| | | | llvm-svn: 165053
* Better const handling for RuntimeDyld and MCJIT.Jim Grosbach2012-09-131-1/+1
| | | | | | mapSectionAddress() wasn't consistent. llvm-svn: 163843
* MCJIT: getPointerToFunction() references target address space.Jim Grosbach2012-09-051-0/+13
| | | | | | | Make sure to return a pointer into the target memory, not the local memory. Often they are the same, but we can't assume that. llvm-svn: 163217
* Fix comment for function RuntimeDyldImpl.resolveRelocation()Danil Malyshev2012-08-271-1/+4
| | | | llvm-svn: 162677
* Correct MCJIT functionality for MIPS32 architecture.Akira Hatanaka2012-08-171-0/+2
| | | | | | | | | | No new tests are added. All tests in ExecutionEngine/MCJIT that have been failing pass after this patch is applied (when "make check" is done on a mips board). Patch by Petar Jovanovic. llvm-svn: 162135
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157885
* RuntimeDyld cleanup:Eli Bendersky2012-05-011-10/+13
| | | | | | | | | | | - 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-8/+8
| | | | | | | | | - 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
* It doesn't make sense to move symbol relocations to section relocations whenEli Bendersky2012-04-301-5/+8
| | | | | | | | | relocations are resolved. It's much more reasonable to do this decision when relocations are just being added - we have all the information at that point. Also a bit of renaming and extra comments to clarify extensions. llvm-svn: 155819
* Code cleanup in RuntimeDyld:Eli Bendersky2012-04-301-32/+56
| | | | | | | | | - 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
* Fix some formatting, grammar and style issues and add a couple of missing ↵Eli Bendersky2012-04-291-12/+13
| | | | | | comments. llvm-svn: 155793
* Implement GDB integration for source level debugging of code JITed usingPreston Gurd2012-04-161-4/+17
| | | | | | | | | | | | | | | 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
* This patch improves the MCJIT runtime dynamic loader by adding new handlingPreston Gurd2012-04-121-0/+9
| | | | | | | | | | of zero-initialized sections, virtual sections and common symbols and preventing the loading of sections which are not required for execution such as debug information. Patch by Andy Kaylor! llvm-svn: 154610
* Re-factored RuntimeDyLd:Danil Malyshev2012-03-301-21/+147
| | | | | | | | | | | | | | | 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-147/+21
| | | | llvm-svn: 153701
OpenPOWER on IntegriCloud