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