summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld
Commit message (Collapse)AuthorAgeFilesLines
...
* Add to RuntimeDyld support different object formatsDanil Malyshev2011-07-134-599/+693
| | | | llvm-svn: 135037
* Be a bit more permissive about symbols we don't understand. Just skip themJim Grosbach2011-05-131-4/+12
| | | | | | rather than throwing an error. llvm-svn: 131322
* Teach the RtDyld to tell the memory manager about how much space a functionJim Grosbach2011-05-131-3/+4
| | | | | | | actually takes rather than how much memory was allocated for it. This is more accurate and should help the manager pack things more effectively. llvm-svn: 131305
* MCJIT section loading should just skip non-text sections rather thanJim Grosbach2011-05-121-4/+4
| | | | | | | erroring out completely. Some modules produce sections that aren't referenced, so it's friendlier to clients like LLDB to just skip them, at least for now. llvm-svn: 131243
* MCJIT lazy relocation resolution and symbol address re-assignment.Jim Grosbach2011-04-121-98/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add handling for tracking the relocations on symbols and resolving them. Keep track of the relocations even after they are resolved so that if the RuntimeDyld client moves the object, it can update the address and any relocations to that object will be updated. For our trival object file load/run test harness (llvm-rtdyld), this enables relocations between functions located in the same object module. It should be trivially extendable to load multiple objects with mutual references. As a simple example, the following now works (running on x86_64 Darwin 10.6): $ cat t.c int bar() { return 65; } int main() { return bar(); } $ clang t.c -fno-asynchronous-unwind-tables -o t.o -c $ otool -vt t.o t.o: (__TEXT,__text) section _bar: 0000000000000000 pushq %rbp 0000000000000001 movq %rsp,%rbp 0000000000000004 movl $0x00000041,%eax 0000000000000009 popq %rbp 000000000000000a ret 000000000000000b nopl 0x00(%rax,%rax) _main: 0000000000000010 pushq %rbp 0000000000000011 movq %rsp,%rbp 0000000000000014 subq $0x10,%rsp 0000000000000018 movl $0x00000000,0xfc(%rbp) 000000000000001f callq 0x00000024 0000000000000024 addq $0x10,%rsp 0000000000000028 popq %rbp 0000000000000029 ret $ llvm-rtdyld t.o -debug-only=dyld ; echo $? Function sym: '_bar' @ 0 Function sym: '_main' @ 16 Extracting function: _bar from [0, 15] allocated to 0x100153000 Extracting function: _main from [16, 41] allocated to 0x100154000 Relocation at '_main' + 16 from '_bar(Word1: 0x2d000000) Resolving relocation at '_main' + 16 (0x100154010) from '_bar (0x100153000)(pcrel, type: 2, Size: 4). loaded '_main' at: 0x100154000 65 $ llvm-svn: 129388
* Tidy up a bit now that we're using the MemoryManager interface.Jim Grosbach2011-04-121-7/+1
| | | | llvm-svn: 129328
* Make error message more useful.Benjamin Kramer2011-04-091-2/+2
| | | | llvm-svn: 129209
* Workaround g++ 4.2.1 warning diagnostic false positive.Jim Grosbach2011-04-081-2/+2
| | | | llvm-svn: 129149
* Refactor MCJIT 32-bit section loading.Jim Grosbach2011-04-081-82/+61
| | | | | | | Teach 32-bit section loading to use the Memory Manager interface, just like the 64-bit loading does. Tidy up a few other things here and there. llvm-svn: 129138
* tidy up.Jim Grosbach2011-04-061-1/+1
| | | | llvm-svn: 129032
* RuntimeDyld should use the memory manager API.Jim Grosbach2011-04-061-82/+83
| | | | | | | | | | Start teaching the runtime Dyld interface to use the memory manager API for allocating space. Rather than mapping directly into the MachO object, we extract the payload for each object and copy it into a dedicated buffer allocated via the memory manager. For now, just do Segment64, so this works on x86_64, but not yet on ARM. llvm-svn: 128973
* Make the virtual destructor out-of-line so we have a key function.Chandler Carruth2011-04-051-0/+3
| | | | llvm-svn: 128964
* Layer the memory manager between the JIT and the runtime Dyld.Jim Grosbach2011-04-041-13/+12
| | | | | | | | | | | The JITMemory manager references LLVM IR constructs directly, while the runtime Dyld works at a lower level and can handle objects which may not originate from LLVM IR. Introduce a new layer for the memory manager to handle the interface between them. For the MCJIT, this layer will be almost entirely simply a call-through w/ translation between the IR objects and symbol names. llvm-svn: 128851
* Instantiate a JITMemoryManager for MCJIT DyldJim Grosbach2011-03-291-3/+7
| | | | llvm-svn: 128485
* Runtime dylib simple ARM 24-bit branch relocation support.Jim Grosbach2011-03-231-14/+49
| | | | llvm-svn: 128184
* Split out relocation resolution into target-specific bits.Jim Grosbach2011-03-231-3/+71
| | | | llvm-svn: 128173
* Start of relocation resolution for the runtime dyld library.Jim Grosbach2011-03-231-21/+130
| | | | llvm-svn: 128161
* Tidy up.Jim Grosbach2011-03-221-2/+1
| | | | llvm-svn: 128096
* Propogate the error message, not just the error state.Jim Grosbach2011-03-221-0/+5
| | | | llvm-svn: 128094
* Hook up the MCJIT to the RuntimeDyld library.Jim Grosbach2011-03-221-2/+8
| | | | | | | | Lots of cleanup to make the interfaces prettier, use the JITMemoryManager, handle multiple functions and modules, etc.. This gets far enough that the MCJIT compiles and runs code, though. llvm-svn: 128052
* Initialize HasError.Jim Grosbach2011-03-221-0/+2
| | | | llvm-svn: 128049
* Library-ize the dyld components of llvm-rtdyld.Jim Grosbach2011-03-213-0/+345
Move the dynamic linking functionality of the llvm-rtdyld program into an ExecutionEngine support library. Update llvm-rtdyld to just load an object file into memory, use the library to process it, then run the _main() function, if one is found. llvm-svn: 128031
OpenPOWER on IntegriCloud