History log of /external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

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

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
354362524a72b3fa43a6c09380b7ae3b2380cbba 19-Nov-2013 Juergen Ributzka <juergen@apple.com> [weak vtables] Remove a bunch of weak vtables

This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file. The memory leaks in this version have been fixed. Thanks
Alexey for pointing them out.

Differential Revision: http://llvm-reviews.chandlerc.com/D2068

Reviewed by Andy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
b21ab43cfc3fa0dacf5c95f04e58b6d804b59a16 18-Nov-2013 Alexey Samsonov <samsonov@google.com> Revert r194865 and r194874.

This change is incorrect. If you delete virtual destructor of both a base class
and a subclass, then the following code:
Base *foo = new Child();
delete foo;
will not cause the destructor for members of Child class. As a result, I observe
plently of memory leaks. Notable examples I investigated are:
ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
5a364c5561ec04e33a6f5d52c14f1bac6f247ea0 15-Nov-2013 Juergen Ributzka <juergen@apple.com> [weak vtables] Remove a bunch of weak vtables

This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file.

Differential Revision: http://llvm-reviews.chandlerc.com/D2068

Reviewed by Andy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
8a631b2cbe2f8621eb3679a4898205da577453b7 15-Nov-2013 Rui Ueyama <ruiu@google.com> Path: Recognize COFF import library file magic.

Summary: Make identify_magic to recognize COFF import file.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2165

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
559d409633ce22574dcab56d4f600b6eb1304652 11-Nov-2013 Andrew Kaylor <andrew.kaylor@intel.com> Fixing a problem with iterator validity in RuntimeDyldImpl::resolveExternalSymbols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
6169453ba37ac353655f2475f336e66f31276752 21-Oct-2013 Andrew Kaylor <andrew.kaylor@intel.com> Improving MCJIT/RuntimeDyld thread safety

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
4805bf59b9e41a95336c066ec58194ff6801694a 19-Oct-2013 Yaron Keren <yaron.keren@gmail.com> Avoid duplicate search by reusing the iterator.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
28a765542c7a57821fc4c06454c1326e2f66a1d9 16-Oct-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding padding to the .eh_frame section in RuntimeDyld

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
43507d026bef31100cb0c35614bcf419029a265b 16-Oct-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding support for deregistering EH frames with MCJIT.

Patch by Yaron Keren



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
b32b0376d4ac04fc2401e70aa0bdd2f6ce5a8968 16-Oct-2013 Rui Ueyama <ruiu@google.com> Path: Recognize Windows compiled resource file.

Some background: One can pass compiled resource files (.res files) directly
to the linker on Windows. If a resource file is given, the linker will run
"cvtres" command in background to convert the resource file to a COFF file
to link it.

What I'm trying to do with this patch is to make the linker to recognize
the resource file by file magic, so that it can run cvtres command.

Differential Revision: http://llvm-reviews.chandlerc.com/D1943

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
ab950f5f334d30a7b5bfb1e009846dfb0b47f61c 15-Oct-2013 Andrew Kaylor <andrew.kaylor@intel.com> Fixing some host==target assumptions in RuntimeDyld

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
528f6d787b1a847e61eb2f1114559f423fdeb68c 11-Oct-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding multiple object support to MCJIT EH frame handling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
8e9ec015348c5419b905c2ca6e39534429eda073 01-Oct-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding multiple module support for MCJIT.

Tests to follow.

PIC with small code model and EH frame handling will not work with multiple modules. There are also some rough edges to be smoothed out for remote target support.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
ff9fa05905be716435460b5f6d32689041bf895b 20-Aug-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding PIC support for ELF on x86_64 platforms

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
32bd10b1a33df2cc4d067a16901d56665f4ba085 19-Aug-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding comments to document RuntimeDyld relocation handling

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
f38cc38fa647d4e72c053c39bbe0cdec1342535f 26-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> [PowerPC] Support powerpc64le as a syntax-checking target.

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
9c22f87b1374b06dc6c07f6e8047890e390bbe2d 18-Jun-2013 Alexey Samsonov <samsonov@google.com> Basic support for parsing Mach-O universal binaries in LLVMObject library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
3ecfcc20c15f9d430b2938416b63d7bbd4d45dec 11-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert another use of sys::identifyFileType.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
f12745f7a7e68c05c89ebd515b9b4faedce37dd0 10-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Pass a StringRef to sys::identifyFileType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
7486d92a6c949a193bb75c0ffa0170eeb2fabb80 30-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Change how we iterate over relocations on ELF.

For COFF and MachO, sections semantically have relocations that apply to them.
That is not the case on ELF.

In relocatable objects (.o), a section with relocations in ELF has offsets to
another section where the relocations should be applied.

In dynamic objects and executables, relocations don't have an offset, they have
a virtual address. The section sh_info may or may not point to another section,
but that is not actually used for resolving the relocations.

This patch exposes that in the ObjectFile API. It has the following advantages:

* Most (all?) clients can handle this more efficiently. They will normally walk
all relocations, so doing an effort to iterate in a particular order doesn't
save time.

* llvm-readobj now prints relocations in the same way the native readelf does.

* probably most important, relocations that don't point to any section are now
visible. This is the case of relocations in the rela.dyn section. See the
updated relocation-executable.test for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
a4ea4a72031809911d77f543eb65175e00fe914e 21-May-2013 Filip Pizlo <fpizlo@apple.com> Put RTDyldMemoryManager into its own file, and make it linked into
libExecutionEngine. Move method implementations that aren't specific to
allocation out of SectionMemoryManager and into RTDyldMemoryManager.

This is in preparation for exposing RTDyldMemoryManager through the C
API.

This is a fixed version of r182407 and r182411. That first revision
broke builds because I forgot to move the conditional includes of
various POSIX headers from SectionMemoryManager into
RTDyldMemoryManager. Those includes are necessary because of how
getPointerToNamedFunction works around the glibc libc_nonshared.a thing.
The latter revision still broke things because I forgot to include
llvm/Config/config.h.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
50f19a906a9d5e42d7707b54a11c0f0c9265fc1f 21-May-2013 Filip Pizlo <fpizlo@apple.com> Roll out r182411 and 182412 because it's still broken.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
876af64ac716ba557a25e136793b9343a24a35ad 21-May-2013 Filip Pizlo <fpizlo@apple.com> Put RTDyldMemoryManager into its own file, and make it linked into
libExecutionEngine. Move method implementations that aren't specific to
allocation out of SectionMemoryManager and into RTDyldMemoryManager.

This is in preparation for exposing RTDyldMemoryManager through the C
API.

This is a fixed version of r182407. That revision broke builds because I
forgot to move the conditional includes of various POSIX headers from
SectionMemoryManager into RTDyldMemoryManager. Those includes are
necessary because of how getPointerToNamedFunction works around the
glibc libc_nonshared.a thing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
1441bf7a41b50075cf761cbc794ce3fd0b5762fc 21-May-2013 Filip Pizlo <fpizlo@apple.com> Roll out r182407 and r182408 because they broke builds.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
3bcc3e6f6316f82adff52a04b0c320c2ce3a3d86 21-May-2013 Filip Pizlo <fpizlo@apple.com> Put RTDyldMemoryManager into its own file, and make it linked into
libExecutionEngine. Move method implementations that aren't specific to
allocation out of SectionMemoryManager and into RTDyldMemoryManager.

This is in preparation for exposing RTDyldMemoryManager through the C
API.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
a2e40fbd624916c187a95ed76939ca7f02ed3e53 05-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Add EH support to the MCJIT.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
4a9b6b798d5ea335f5f29d278db83b830ae4a564 04-May-2013 Tim Northover <Tim.Northover@arm.com> AArch64: add stubs to support long function calls on MCJIT

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
6fc2ad62e23673ef829c9c4bbf62743d30928a5b 03-May-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Add MCJIT support

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
59a0e79631ed851d98cf9c2ba6fa5f9aafdfdc93 30-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add getSymbolAlignment to the ObjectFile interface.

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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
ca0e73610056110e9a175c14dd82d6d616fd830f 29-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Use a RelocationRef instead of a relocation_iterator.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
87b5017139e9d8ac9b046b3284a9cc68c76185d6 29-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Propagate relocation info to resolveRelocation.

This gets most of the MCJITs tests passing with MachO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
efa91f6475f6e96552986104ab4857db46185a2a 29-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Replace ObjRelocationInfo with relocation_iterator.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
29fe150bff0f167e85e1b44efe344bf28cb7fe0f 20-Feb-2013 Andrew Kaylor <andrew.kaylor@intel.com> Formatting, grammar

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
7b170500dcfce130c1e5af1c9150014e69e56819 20-Feb-2013 Andrew Kaylor <andrew.kaylor@intel.com> Adding support for absolute relocations. This occurs in ELF files when a relocation is given with no name and an undefined section. The relocation is applied with an address of zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
788221398a2cdb219c37625b5176211e7c7d44a6 17-Dec-2012 Tim Northover <Tim.Northover@arm.com> Query section for whether it should be executable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
4af1ca5229a149c1d8e5e89bc2f13209da33221c 04-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> RuntimeDyld: Fix up r169178. MSVC doesn't like "or".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
ade047463fd6e0fbb447145eb06015b8e7836482 04-Dec-2012 Akira Hatanaka <ahatanaka@mips.com> Runtime dynamic linker for MCJIT should support MIPS BigEndian architecture.
This small change adds support for that. It will make all MCJIT tests pass
in make-check on BigEndian platforms.

Patch by Petar Jovanovic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
098d6d57346322c7f71f4e3e45bbea81039386c4 16-Nov-2012 Amara Emerson <amara.emerson@arm.com> Add R_ARM_TARGET1 relocation to MCJIT and ensure that the runtime dyld reads
all symbols during object loading, not just global ones.

This fixes JIT execution of code using llvm.global_ctors with internal
linkage constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
28989889bf3aa3314562d438aece245b71176ec4 05-Nov-2012 Andrew Kaylor <andrew.kaylor@intel.com> Add a method to indicate section address re-assignment is finished.

Prior to this patch RuntimeDyld attempted to re-apply relocations every time reassignSectionAddress was called (via MCJIT::mapSectionAddress). In addition to being inefficient and redundant, this led to a problem when a section was temporarily moved too far away from another section with a relative relocation referencing the section being moved. To fix this, I'm adding a new method (finalizeObject) which the client can call to indicate that it is finished rearranging section addresses so the relocations can safely be applied.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
a307a1cf859f4a523951ac887d094039547adeb5 02-Nov-2012 Andrew Kaylor <andrew.kaylor@intel.com> Change resolveRelocation parameters so the relocations can find placeholder 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
5fc8c7cb8571f99b69264aeba48c45eed1c69f6a 01-Nov-2012 Andrew Kaylor <andrew.kaylor@intel.com> Fixed format string to avoid pointer truncation during 64-bit debugging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
f00677d74f1be5b4c7c73e1681a64c9062f4c7ee 29-Oct-2012 Tim Northover <Tim.Northover@arm.com> Make use of common-symbol alignment info in ELF loader.

Patch by Amara Emerson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
6e8946c5280ad6071d21013651745a9478f063ed 25-Oct-2012 Adhemerval Zanella <azanella@linux.vnet.ibm.com> PowerPC: Initial support for PowerPC64 MCJIT

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
a7ca3c2a286bded5e2c323763d905aac7f5ec7c9 12-Oct-2012 Eric Christopher <echristo@gmail.com> Indenting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
e940c1bb6c976539f07d6f440aeaacf7c25e1ddc 13-Sep-2012 Jim Grosbach <grosbach@apple.com> Better const handling for RuntimeDyld and MCJIT.

mapSectionAddress() wasn't consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
35ed842773da41779d57d3ed23f440202d0be198 05-Sep-2012 Jim Grosbach <grosbach@apple.com> MCJIT: getPointerToFunction() references target address space.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
b889e0cd2fea4afee623d5be603b912b955a2eca 17-Aug-2012 Akira Hatanaka <ahatanaka@mips.com> Correct MCJIT functionality for MIPS32 architecture.

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
c8e41c591741b3da1077f7000274ad040bef8002 23-Jul-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo (the the => the)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
c201e6eaf165c83f0092c43b371e509fa8eaf4cc 01-May-2012 Eli Bendersky <eli.bendersky@intel.com> RuntimeDyld cleanup:

- 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
d98c9e918c9750d965c1efe9efcc9e13feacbe13 01-May-2012 Eli Bendersky <eli.bendersky@intel.com> RuntimeDyld code cleanup:

- 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
37bc5a200092f1b41da799c75da70258015e43a4 30-Apr-2012 Eli Bendersky <eli.bendersky@intel.com> It doesn't make sense to move symbol relocations to section relocations when
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
6d15e8717767af9a6a20c6ea456119c15c77dd00 30-Apr-2012 Eli Bendersky <eli.bendersky@intel.com> Code cleanup in RuntimeDyld:

- 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
5fe019835c269ccbfe185276269bc53b3f9a7a86 29-Apr-2012 Eli Bendersky <eli.bendersky@intel.com> Fix some formatting, grammar and style issues and add a couple of missing comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
689ff9c00f4f3dcf3491778bcdbda79e19e2285d 17-Apr-2012 Preston Gurd <preston.gurd@intel.com> Implement GDB integration for source level debugging of code JITed using
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!




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
c68dda815e64fb2fb463318d1eaa304e22199d50 12-Apr-2012 Preston Gurd <preston.gurd@intel.com> This patch improves the MCJIT runtime dynamic loader by adding new handling
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!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
76463fdeb603e1d89b05f094bfd6fe73b90d0b61 22-Jan-2012 Eli Bendersky <eli.bendersky@intel.com> Split the lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h header to 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
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
e0934bee3a4f40731169bc42b15a39ce39978175 17-Jan-2012 Jim Grosbach <grosbach@apple.com> Tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
020f4e861a9a32059f76377e787703c92ba55a98 17-Jan-2012 Jim Grosbach <grosbach@apple.com> ExecutionEngine interface to re-map addresses for engines that support it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
a66a18505e07a4e72d6fa7e85663937a257577f3 16-Jan-2012 Eli Bendersky <eli.bendersky@intel.com> Adding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is currently basic and will be enhanced with future patches.
Patch developed by Andy Kaylor and Daniel Malea. Reviewed on llvm-commits.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
cf852dc49bfadb79a27455f8773dbfda2b96f4f6 13-Jul-2011 Danil Malyshev <dmalyshev@accesssoftek.com> Add to RuntimeDyld support different object formats

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
1c3c8ea66261b7a4fd8813f096514c0a041fbda6 14-May-2011 Jim Grosbach <grosbach@apple.com> Be a bit more permissive about symbols we don't understand. Just skip them
rather than throwing an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
ffa625072ca32a7209492b98f697df43f1e85c0a 13-May-2011 Jim Grosbach <grosbach@apple.com> Teach the RtDyld to tell the memory manager about how much space a function
actually takes rather than how much memory was allocated for it. This
is more accurate and should help the manager pack things more effectively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
757a142ea845ee44cc9340063bbc2f992e8c4232 12-May-2011 Jim Grosbach <grosbach@apple.com> MCJIT section loading should just skip non-text sections rather than
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
cc513e1cf19bbdab83c5336455196e0e91d57f32 09-Apr-2011 Benjamin Kramer <benny.kra@googlemail.com> Make error message more useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
e2e777b0e73809047d98066ebcc28042882d1cf8 08-Apr-2011 Jim Grosbach <grosbach@apple.com> Workaround g++ 4.2.1 warning diagnostic false positive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
01ccab401263e19ea791e43d00915a378c548df9 07-Apr-2011 Jim Grosbach <grosbach@apple.com> tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
53c5e7b2e7e36d70bd943cb2d576121435bd5b3f 06-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Make the virtual destructor out-of-line so we have a key function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
5ffe37f2c7cddb6b7401f4bef9cf19ce90bbbe20 24-Mar-2011 Jim Grosbach <grosbach@apple.com> Runtime dylib simple ARM 24-bit branch relocation support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
a8287e322f94ddd66fcb9ae26c4b37e02bd1f796 23-Mar-2011 Jim Grosbach <grosbach@apple.com> Split out relocation resolution into target-specific bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
8b54dca41c7420ecbca47bb8336e6e6c6e5f8433 23-Mar-2011 Jim Grosbach <grosbach@apple.com> Start of relocation resolution for the runtime dyld library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
91dde155f1c42417e4db24fb595494b14fd7ab2e 22-Mar-2011 Jim Grosbach <grosbach@apple.com> Tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
f922910494377909b4cf2a0b73f509b2b1925799 22-Mar-2011 Jim Grosbach <grosbach@apple.com> Hook up the MCJIT to the RuntimeDyld library.

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
8371c8990251bd70377ff0673b4dc2e325388a12 22-Mar-2011 Jim Grosbach <grosbach@apple.com> Initialize HasError.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.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/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp