summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-04-24 01:36:37 +0000
committerDavide Italiano <davide@freebsd.org>2016-04-24 01:36:37 +0000
commitcefdf238e9ca9df240c2dbc3df3ced3fa9338686 (patch)
treea707b81d79d9423678d218acc960f8ed5b0d02a9 /llvm/lib
parent327b88c36dfce8cb8acf54a01e5a9b41a44872eb (diff)
downloadbcm5719-llvm-cefdf238e9ca9df240c2dbc3df3ced3fa9338686.tar.gz
bcm5719-llvm-cefdf238e9ca9df240c2dbc3df3ced3fa9338686.zip
[RuntimeDyldELF] Handle GOTPCRELX/REX_GOTPCRELX.
llvm-svn: 267309
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 5dc1731bca8..c2b843e923f 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -1708,7 +1708,9 @@ relocation_iterator RuntimeDyldELF::processRelocationRef(
Value.Offset);
addRelocationForSection(RE, Value.SectionID);
}
- } else if (RelType == ELF::R_X86_64_GOTPCREL) {
+ } else if (RelType == ELF::R_X86_64_GOTPCREL ||
+ RelType == ELF::R_X86_64_GOTPCRELX ||
+ RelType == ELF::R_X86_64_REX_GOTPCRELX) {
uint64_t GOTOffset = allocateGOTEntries(SectionID, 1);
resolveGOTOffsetRelocation(SectionID, Offset, GOTOffset + Addend);
@@ -1869,6 +1871,8 @@ bool RuntimeDyldELF::relocationNeedsStub(const RelocationRef &R) const {
case ELF::R_X86_64_GOTPCREL:
+ case ELF::R_X86_64_GOTPCRELX:
+ case ELF::R_X86_64_REX_GOTPCRELX:
case ELF::R_X86_64_PC32:
case ELF::R_X86_64_PC64:
case ELF::R_X86_64_64:
OpenPOWER on IntegriCloud