[lld] r288101 - Add a test.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 19:30:08 PST 2016
Author: rafael
Date: Mon Nov 28 21:30:07 2016
New Revision: 288101
URL: http://llvm.org/viewvc/llvm-project?rev=288101&view=rev
Log:
Add a test.
It would have found a missing case in another patch.
Added:
lld/trunk/test/ELF/aarch64-got-reloc.s
Added: lld/trunk/test/ELF/aarch64-got-reloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-got-reloc.s?rev=288101&view=auto
==============================================================================
--- lld/trunk/test/ELF/aarch64-got-reloc.s (added)
+++ lld/trunk/test/ELF/aarch64-got-reloc.s Mon Nov 28 21:30:07 2016
@@ -0,0 +1,30 @@
+// REQUIRES: aarch64
+// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
+// RUN: ld.lld %t.o -o %t
+// RUN: llvm-readobj -s --section-data %t | FileCheck %s
+
+// CHECK: Name: .got
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_WRITE
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x30000
+// CHECK-NEXT: Offset: 0x20000
+// CHECK-NEXT: Size: 8
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 00000000 00000000 |........|
+// CHECK-NEXT: )
+
+ .globl _start
+_start:
+ adrp x8, :got:foo
+ ldr x8, [x8, :got_lo12:foo]
+ ldr w0, [x8]
+ ret
+
+ .weak foo
More information about the llvm-commits
mailing list