summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Target.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Target.cpp')
-rw-r--r--lld/ELF/Target.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 3d16295c230..61a843b170f 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -1405,17 +1405,16 @@ void AArch64TargetInfo::relaxTlsIeToLe(uint8_t *Loc, uint32_t Type,
llvm_unreachable("invalid relocation for TLS IE to LE relaxation");
}
-// Implementing relocations for AMDGPU is low priority since most
-// programs don't use relocations now. Thus, this function is not
-// actually called (relocateOne is called for each relocation).
-// That's why the AMDGPU port works without implementing this function.
void AMDGPUTargetInfo::relocateOne(uint8_t *Loc, uint32_t Type,
uint64_t Val) const {
- llvm_unreachable("not implemented");
+ assert(Type == R_AMDGPU_REL32);
+ write32le(Loc, Val);
}
RelExpr AMDGPUTargetInfo::getRelExpr(uint32_t Type, const SymbolBody &S) const {
- llvm_unreachable("not implemented");
+ if (Type != R_AMDGPU_REL32)
+ error("do not know how to handle relocation");
+ return R_PC;
}
ARMTargetInfo::ARMTargetInfo() {
OpenPOWER on IntegriCloud