summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
diff options
context:
space:
mode:
authorDavid Tweed <david.tweed@arm.com>2013-05-17 14:31:59 +0000
committerDavid Tweed <david.tweed@arm.com>2013-05-17 14:31:59 +0000
commit91c623d4ee6a9fddf73b8057d61bd9423feeb14d (patch)
treedd9c89ca595b2047c62f24daaff0cf3b0d0d4d8c /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
parent4456a8ec76bba1148f64bb2707e18b980eda291e (diff)
downloadllvm-91c623d4ee6a9fddf73b8057d61bd9423feeb14d.tar.gz
llvm-91c623d4ee6a9fddf73b8057d61bd9423feeb14d.tar.bz2
llvm-91c623d4ee6a9fddf73b8057d61bd9423feeb14d.tar.xz
r182085 introduced a change that triggered an assertion on ARM. This is an immediate fix
which doesn't resolve the deeper problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182098 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 57676ffaf4..2773bf1e19 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -277,6 +277,7 @@ void RuntimeDyldELF::resolveX86Relocation(const SectionEntry &Section,
}
}
+// FIXME: PR16013: this routine needs modification to handle repeated relocations.
void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section,
uint64_t Offset,
uint64_t Value,
@@ -356,6 +357,7 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section,
}
}
+// FIXME: PR16013: this routine needs modification to handle repeated relocations.
void RuntimeDyldELF::resolveARMRelocation(const SectionEntry &Section,
uint64_t Offset,
uint32_t Value,
@@ -391,8 +393,8 @@ void RuntimeDyldELF::resolveARMRelocation(const SectionEntry &Section,
// We are not expecting any other addend in the relocation address.
// Using 0x000F0FFF because MOVW has its 16 bit immediate split into 2
// non-contiguous fields.
- assert((*TargetPtr & 0x000F0FFF) == 0);
Value = Value & 0xFFFF;
+ *TargetPtr &= ~0x000F0FFF; // Not really right; see FIXME at top.
*TargetPtr |= Value & 0xFFF;
*TargetPtr |= ((Value >> 12) & 0xF) << 16;
break;
@@ -402,8 +404,8 @@ void RuntimeDyldELF::resolveARMRelocation(const SectionEntry &Section,
case ELF::R_ARM_MOVT_ABS :
// We are not expecting any other addend in the relocation address.
// Use 0x000F0FFF for the same reason as R_ARM_MOVW_ABS_NC.
- assert((*TargetPtr & 0x000F0FFF) == 0);
Value = (Value >> 16) & 0xFFFF;
+ *TargetPtr &= ~0x000F0FFF; // Not really right; see FIXME at top.
*TargetPtr |= Value & 0xFFF;
*TargetPtr |= ((Value >> 12) & 0xF) << 16;
break;