brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1021 B · 0dbec36 Raw
35 lines · plain
1# REQUIRES: aarch642 3# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o4# RUN: %lld -arch arm64 -lSystem  -fixup_chains -o %t.out %t.o5# RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s --check-prefix=CHECK --check-prefix=FIRST6 7# Prepend a dummy entry to check if the address for _objc_msgSend is valid.8# RUN: %lld -arch arm64 -lSystem  -fixup_chains -e _dummy -U _dummy -o %t.out %t.o9# RUN: llvm-otool -vs __TEXT __objc_stubs %t.out | FileCheck %s --check-prefix=CHECK --check-prefix=SECOND10 11# CHECK: Contents of (__TEXT,__objc_stubs) section12 13# CHECK-NEXT: _objc_msgSend$foo:14# CHECK-NEXT: adrp    x1, 8 ; 0x10000800015# CHECK-NEXT: ldr     x1, [x1]16# CHECK-NEXT: adrp    x16, 4 ; 0x10000400017# FIRST-NEXT: ldr     x16, [x16]18# SECOND-NEXT:ldr     x16, [x16, #0x8]19# CHECK-NEXT: br      x1620# CHECK-NEXT: brk     #0x121# CHECK-NEXT: brk     #0x122# CHECK-NEXT: brk     #0x123 24# CHECK-EMPTY:25 26.text27.globl _objc_msgSend28_objc_msgSend:29  ret30 31.globl _main32_main:33  bl  _objc_msgSend$foo34  ret35