History log of /external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
4d6b695c953462c3317e3a7eb57d0534db858ac2 05-Nov-2013 Alp Toker <alp@nuanti.com> Suppress OS crash dialog in llvm-rtdyld

All other tools have this -- it's needed to avoid hanging lit on Windows in
case of a crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
6eb43d295625cd2ff314c59b49d4fd11f3348cad 02-Oct-2013 Filip Pizlo <fpizlo@apple.com> This threads SectionName through the allocateCodeSection/allocateDataSection APIs, both in C++ and C land.
It's useful for the memory managers that are allocating a section to know what the name of the section is.
At a minimum, this is useful for low-level debugging - it's customary for JITs to be able to tell you what
memory they allocated, and as part of any such dump, they should be able to tell you some meta-data about
what each allocation is for. This allows clients that supply their own memory managers to do this.
Additionally, we also envision the SectionName being useful for passing meta-data from within LLVM to an LLVM
client.

This changes both the C and C++ APIs, and all of the clients of those APIs within LLVM. I'm assuming that
it's safe to change the C++ API because that API is allowed to change. I'm assuming that it's safe to change
the C API because we haven't shipped the API in a release yet (LLVM 3.3 doesn't include the MCJIT memory
management C API).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
bd194ced30c9fc86bb73313574bd96208e660b4c 04-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> Unbreak llvm-rtdyld build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
a757e936263d0a95cbacff4fedd4703e5185800c 04-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> llvm-rtdyld: Don't leak memory managers.

Dyld never outlives MemMgr, just put both on the stack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
abb38fe8dec11b1ea7535f84fac8ad0f0af70add 17-May-2013 David Tweed <david.tweed@arm.com> Minor changes to the MCJITTest unittests to use the correct API for finalizing
the JIT object (including XFAIL an ARM test that now needs fixing). Also renames
internal function for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
2173e1839c2d00f7f980450dd537047b7b376e6b 26-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Use llvm/Object/MachO.h in macho-dumper. Drop the old macho parser.

For Mach-O there were 2 implementations for parsing object files. A
standalone llvm/Object/MachOObject.h and llvm/Object/MachO.h which
implements the generic interface in llvm/Object/ObjectFile.h.

This patch adds the missing features to MachO.h, moves macho-dump to
use MachO.h and removes ObjectFile.h.

In addition to making sure that check-all is clean, I checked that the
new version produces exactly the same output in all Mach-O files in a
llvm+clang build directory (including executables and shared
libraries).

To test the performance, I ran macho-dump over all the files in a
llvm+clang build directory again, but this time redirecting the output
to /dev/null. Both the old and new versions take about 4.6 seconds
(2.5 user) to finish.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
e27a787760ea7c2899da3287002fe8ba316df0d0 26-Jan-2013 Andrew Kaylor <andrew.kaylor@intel.com> Add DIContext::getLineInfoForAddressRange() function and test. This function allows a caller to obtain a table of line information for a function using the function's address and size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
ee7c0d2f931590ccdc53a14b1839e11bb29fc96e 25-Jan-2013 Andrew Kaylor <andrew.kaylor@intel.com> Add support for applying in-memory relocations to the .debug_line section and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
f010c464a11444733ec67e31aace8bcebeaf2588 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for tools/...

Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
53608a34ce3f0969e9fb01eaa983422761011e03 16-Nov-2012 Andrew Kaylor <andrew.kaylor@intel.com> Interface changes to allow RuntimeDyld memory managers to set memory permissions after an object has been loaded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
3f23cef24fc9200def464bd4bce820678b5715de 02-Oct-2012 Andrew Kaylor <andrew.kaylor@intel.com> Clean-up of memory buffer and object ownership model in MCJIT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
068c65b22d50c265b51886062b2b9c1cb696d67d 16-May-2012 Danil Malyshev <dmalyshev@accesssoftek.com> Added LLIMCJITMemoryManager to the lli. This manager will be used for MCJIT instead of DefaultJIMMemoryManager.
It's more flexible for MCJIT tasks, in addition it's provides a invalidation instruction cache for code sections which will be used before JIT code will be executed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
0e4fa5ff365fccff46870b7d5d8d4d1d46e77986 30-Mar-2012 Danil Malyshev <dmalyshev@accesssoftek.com> Re-factored RuntimeDyLd:

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
288967dfac246c8e35dc4f85afb667e74d1d26a8 30-Mar-2012 Bill Wendling <isanbard@gmail.com> Revert r153694. It was causing failures in the buildbots.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
4b0b8ef1b0edc2c343145f6b029c43b00a6f5c13 29-Mar-2012 Danil Malyshev <dmalyshev@accesssoftek.com> Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
30b9e322e159df8eaabb5b194cec6e11ba99c261 28-Mar-2012 Danil Malyshev <dmalyshev@accesssoftek.com> Move getPointerToNamedFunction() from JIT/MCJIT to JITMemoryManager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
3e29671cca14f8fce1ea6b602175880cb3df7199 22-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Revert a series of commits to MCJIT to get the build working in CMake
(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
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
799184d8eb140d02385501223cea0a087148b67b 21-Mar-2012 Danil Malyshev <dmalyshev@accesssoftek.com> Re-factored RuntimeDyld.
Added ExecutionEngine/MCJIT tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
b4746203986e943f3dc0af789c5dc8b34cc85db5 21-Mar-2012 Danil Malyshev <dmalyshev@accesssoftek.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
fdebc38523b397743973ff6a2d2e93b112dd96e5 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
61425c0a7f4e3608a85f7bbf254cd052a15b7446 16-Jan-2012 Jim Grosbach <grosbach@apple.com> MCJIT support for non-function sections.

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
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
2bd335470f8939782f3df7f6180282d3825d4f09 10-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches that cover all enum values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
4f9f41f2f9772ecd6a57800fcc8de8ec2734f33c 13-Apr-2011 Jim Grosbach <grosbach@apple.com> Load multiple object files and link them via RuntimeDyld in llvm-rtdyld.

Relocations between the object modules are properly resolved, as in the
following trivial example:

$ cat t.c
int foo();
int main() {
return foo();
}
$ cat foo.c
int foo() {
return 65;
}
$ clang -c t.c -fno-asynchronous-unwind-tables
$ clang -c foo.c -fno-asynchronous-unwind-tables
$ llvm-rtdyld t.o foo.o ; echo $?
loaded '_main' at: 0x10015c000
65



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
6b32e7e213ca14d5d898c84053d6f38a4c360763 13-Apr-2011 Jim Grosbach <grosbach@apple.com> Allow user-specified program entry point for llvm-rtdyld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
f8c1c8465ff097ad5b87331b6d9a2576167f1402 12-Apr-2011 Jim Grosbach <grosbach@apple.com> MCJIT lazy relocation resolution and symbol address re-assignment.

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
$




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
7cbf92d1d9945c35d1021458280bb7984f796a01 12-Apr-2011 Jim Grosbach <grosbach@apple.com> Tidy up a bit now that we're using the MemoryManager interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
b027105fa50c864d44873dc78daafb3db3ec9c14 08-Apr-2011 Jim Grosbach <grosbach@apple.com> Refactor MCJIT 32-bit section loading.

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
c41ab789a052d7a8a4eacecfa1edd4af0d933990 06-Apr-2011 Jim Grosbach <grosbach@apple.com> RuntimeDyld should use the memory manager API.

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
fcbe5b71936b820647dffff0e4f9c60ece3988a5 05-Apr-2011 Jim Grosbach <grosbach@apple.com> Layer the memory manager between the JIT and the runtime Dyld.

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
5acfa9f0fd641906e520a6caaf644d03def27ae0 29-Mar-2011 Jim Grosbach <grosbach@apple.com> Instantiate a JITMemoryManager for MCJIT Dyld

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
b3eecaf19e81f0cccffdeff940afbfd1a3754af2 22-Mar-2011 Jim Grosbach <grosbach@apple.com> Propogate the error message, not just the error state.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
6e56331ed99e5b96de940dfdc53e438eef521a2e 21-Mar-2011 Jim Grosbach <grosbach@apple.com> Library-ize the dyld components of llvm-rtdyld.

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
35fdeb7b373e416ff00c54abef12e786963af725 18-Mar-2011 Jim Grosbach <grosbach@apple.com> Add llvm-rtdyld support for loading 32-bit code.

Factor out the 64-bit specific bits into a helper function and add an
equivalent that loads the 32-bit sections. This allows using llvm-rtdyld on ARM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
82c25b4964f91760fb4731cdef114b2ba2a950cc 18-Mar-2011 Jim Grosbach <grosbach@apple.com> Naming conventional tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
1cb19a4470533be84eb61e8f5fc40aa9d45f86f9 18-Mar-2011 Jim Grosbach <grosbach@apple.com> MachO file loader and execution utility.

Add a bone-simple utility to load a MachO object into memory, look for
a function (main) in it, and run that function directly. This will be used
as a test and development platform for MC-JIT work regarding symbol resolution,
dynamic lookup, etc..

Code by Daniel Dunbar.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp