[PATCH] D30628: [ELF] Handle NONE relocations on AArch64

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 14:54:37 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL297525: [ELF] Handle NONE relocations on AArch64 (authored by phosek).

Changed prior to commit:
  https://reviews.llvm.org/D30628?vs=91021&id=91423#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D30628

Files:
  lld/trunk/ELF/Target.cpp
  lld/trunk/test/ELF/relocation-none-aarch64.test


Index: lld/trunk/test/ELF/relocation-none-aarch64.test
===================================================================
--- lld/trunk/test/ELF/relocation-none-aarch64.test
+++ lld/trunk/test/ELF/relocation-none-aarch64.test
@@ -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
Index: lld/trunk/ELF/Target.cpp
===================================================================
--- lld/trunk/ELF/Target.cpp
+++ lld/trunk/ELF/Target.cpp
@@ -1320,6 +1320,8 @@
   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;
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30628.91423.patch
Type: text/x-patch
Size: 1201 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170310/b6dff601/attachment.bin>


More information about the llvm-commits mailing list