AArch64/ARM64: enable some MC tests on ARM64
[oota-llvm.git] / test / MC / AArch64 / elf-extern.s
1 // RUN: llvm-mc < %s -triple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
2 // RUN: llvm-mc < %s -triple=arm64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
3
4 // External symbols are a different concept to global variables but should still
5 // get relocations and so on when used.
6
7         .file   "<stdin>"
8         .text
9         .globl  check_extern
10         .type   check_extern,@function
11 check_extern:                           // @check_extern
12         .cfi_startproc
13 // BB#0:
14         sub     sp, sp, #16
15 .Ltmp2:
16         .cfi_def_cfa sp, 16
17         str     x30, [sp, #8]           // 8-byte Folded Spill
18 .Ltmp3:
19         .cfi_offset x30, -8
20         bl      memcpy
21         mov      x0, xzr
22         ldr     x30, [sp, #8]           // 8-byte Folded Reload
23         add     sp, sp, #16
24         ret
25 .Ltmp4:
26         .size   check_extern, .Ltmp4-check_extern
27         .cfi_endproc
28
29
30 // CHECK: Relocations [
31 // CHECK:   Section (2) .rela.text {
32 // CHECK:     0x{{[0-9,A-F]+}} R_AARCH64_CALL26 memcpy
33 // CHECK:   }
34 // CHECK: ]