summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@imgtec.com>2015-08-13 15:12:49 +0000
committerPetar Jovanovic <petar.jovanovic@imgtec.com>2015-08-13 15:12:49 +0000
commitd22164dc3bf6de749b129d3293c3ac654e728c41 (patch)
tree720593837bf022c093abf31dd799eddaf1ba766f /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
parent25f51850a4f2f29c16e78e5a889527f4ae486d61 (diff)
downloadbcm5719-llvm-d22164dc3bf6de749b129d3293c3ac654e728c41.tar.gz
bcm5719-llvm-d22164dc3bf6de749b129d3293c3ac654e728c41.zip
[mips][mcjit] Calculate correct addend for HI16 and PCHI16 reloc
Previously, for O32 ABI we did not calculate correct addend for R_MIPS_HI16 and R_MIPS_PCHI16 relocations. This patch fixes that. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D11186 llvm-svn: 244897
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
index 040f986e20f..22f021401d2 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
@@ -123,6 +123,10 @@ class RuntimeDyldELF : public RuntimeDyldImpl {
// no particular advanced processing.
void processSimpleRelocation(unsigned SectionID, uint64_t Offset, unsigned RelType, RelocationValueRef Value);
+ // Return matching *LO16 relocation (Mips specific)
+ uint32_t getMatchingLoRelocation(uint32_t RelType,
+ bool IsLocal = false) const;
+
// The tentative ID for the GOT section
unsigned GOTSectionID;
@@ -138,6 +142,10 @@ class RuntimeDyldELF : public RuntimeDyldImpl {
// A map to avoid duplicate got entries (Mips64 specific)
StringMap<uint64_t> GOTSymbolOffsets;
+ // *HI16 relocations will be added for resolving when we find matching
+ // *LO16 part. (Mips specific)
+ SmallVector<std::pair<RelocationValueRef, RelocationEntry>, 8> PendingRelocs;
+
// When a module is loaded we save the SectionID of the EH frame section
// in a table until we receive a request to register all unregistered
// EH frame sections with the memory manager.
OpenPOWER on IntegriCloud