mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[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/trunk@195157 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user