[lld] r297525 - [ELF] Handle NONE relocations on AArch64
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 14:42:22 PST 2017
Author: phosek
Date: Fri Mar 10 16:42:22 2017
New Revision: 297525
URL: http://llvm.org/viewvc/llvm-project?rev=297525&view=rev
Log:
[ELF] Handle NONE relocations on AArch64
Differential Revision: https://reviews.llvm.org/D30628
Added:
lld/trunk/test/ELF/relocation-none-aarch64.test
Modified:
lld/trunk/ELF/Target.cpp
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=297525&r1=297524&r2=297525&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Fri Mar 10 16:42:22 2017
@@ -1320,6 +1320,8 @@ RelExpr AArch64TargetInfo::getRelExpr(ui
case R_AARCH64_ADR_GOT_PAGE:
case R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21:
return R_GOT_PAGE_PC;
+ case R_AARCH64_NONE:
+ return R_NONE;
}
}
Added: lld/trunk/test/ELF/relocation-none-aarch64.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-none-aarch64.test?rev=297525&view=auto
==============================================================================
--- lld/trunk/test/ELF/relocation-none-aarch64.test (added)
+++ lld/trunk/test/ELF/relocation-none-aarch64.test Fri Mar 10 16:42:22 2017
@@ -0,0 +1,24 @@
+# REQUIRES: aarch64
+
+# RUN: yaml2obj %s -o %t.o
+# RUN: ld.lld %t.o -o %t.out
+
+!ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_AARCH64
+Sections:
+ - Type: SHT_PROGBITS
+ Name: .text
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ Content: "00000000"
+ - Type: SHT_RELA
+ Name: .rela.text
+ Link: .symtab
+ Info: .text
+ Relocations:
+ - Offset: 0
+ Symbol: ''
+ Type: R_AARCH64_NONE
More information about the llvm-commits
mailing list