Initialize RelativeRel for AMDGPU.
authorRui Ueyama <ruiu@google.com>
Wed, 31 Aug 2016 21:04:25 +0000 (21:04 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 31 Aug 2016 21:04:25 +0000 (21:04 +0000)
Target->RelativeRel is used for all platforms, but AMDGPU did
not send that member.

Fixes bug 30227 - RelativeRel is used, but not initialized for AMDGPU.

Differential Revision: https://reviews.llvm.org/D24100

llvm-svn: 280291

lld/ELF/Target.cpp

index 3f97079..e40baee 100644 (file)
@@ -1457,6 +1457,7 @@ void AArch64TargetInfo::relaxTlsIeToLe(uint8_t *Loc, uint32_t Type,
 }
 
 AMDGPUTargetInfo::AMDGPUTargetInfo() {
+  RelativeRel = R_AMDGPU_REL64;
   GotRel = R_AMDGPU_ABS64;
   GotEntrySize = 8;
 }