34 lines · plain
1// RUN: llvm-mc < %s -triple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r - | FileCheck %s2 3// External symbols are a different concept to global variables but should still4// get relocations and so on when used.5 6 .file "<stdin>"7 .text8 .globl check_extern9 .type check_extern,@function10check_extern: // @check_extern11 .cfi_startproc12// %bb.0:13 sub sp, sp, #1614.Ltmp2:15 .cfi_def_cfa sp, 1616 str x30, [sp, #8] // 8-byte Folded Spill17.Ltmp3:18 .cfi_offset x30, -819 bl memcpy20 mov x0, xzr21 ldr x30, [sp, #8] // 8-byte Folded Reload22 add sp, sp, #1623 ret24.Ltmp4:25 .size check_extern, .Ltmp4-check_extern26 .cfi_endproc27 28 29// CHECK: Relocations [30// CHECK: Section {{.*}} .rela.text {31// CHECK: 0x{{[0-9,A-F]+}} R_AARCH64_CALL26 memcpy32// CHECK: }33// CHECK: ]34