diff options
author | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2013-11-21 00:52:34 +0000 |
---|---|---|
committer | Petar Jovanovic <petar.jovanovic@imgtec.com> | 2013-11-21 00:52:34 +0000 |
commit | 0ff917e85472b98aec8f9d48647cde6941a5ea27 (patch) | |
tree | 735a63a805c19d435a44d5455fe9375796cd7182 /lib | |
parent | 4526aebd751dfd5b12a8728524684eda7013a2fd (diff) | |
download | external_llvm-0ff917e85472b98aec8f9d48647cde6941a5ea27.zip external_llvm-0ff917e85472b98aec8f9d48647cde6941a5ea27.tar.gz external_llvm-0ff917e85472b98aec8f9d48647cde6941a5ea27.tar.bz2 |
Merging r195157:
------------------------------------------------------------------------
r195157 | petarj | 2013-11-19 22:56:00 +0100 (Tue, 19 Nov 2013) | 8 lines
[mips] Resolve relocation for the stubs in MCJIT when load address is known
Instead of processing relocation for branch to stubs right away, emit a
modified relocation and add it to queue to be resolved later when final load
address is known.
This resolves seven MIPS MCJIT issues that were caused by missing relocation
fixups at the end.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index fa14c8c..f2c69fc 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -1031,8 +1031,8 @@ void RuntimeDyldELF::processRelocationRef(unsigned SectionID, // Look up for existing stub. StubMap::const_iterator i = Stubs.find(Value); if (i != Stubs.end()) { - resolveRelocation(Section, Offset, - (uint64_t)Section.Address + i->second, RelType, 0); + RelocationEntry RE(SectionID, Offset, RelType, i->second); + addRelocationForSection(RE, SectionID); DEBUG(dbgs() << " Stub function found\n"); } else { // Create a new stub function. @@ -1057,9 +1057,8 @@ void RuntimeDyldELF::processRelocationRef(unsigned SectionID, addRelocationForSection(RELo, Value.SectionID); } - resolveRelocation(Section, Offset, - (uint64_t)Section.Address + Section.StubOffset, - RelType, 0); + RelocationEntry RE(SectionID, Offset, RelType, Section.StubOffset); + addRelocationForSection(RE, SectionID); Section.StubOffset += getMaxStubSize(); } } else if (Arch == Triple::ppc64 || Arch == Triple::ppc64le) { |