brintos

brintos / llvm-project-archived public Read only

0
0
Text · 820 B · 22ccc16 Raw
35 lines · plain
1# RUN: llvm-mc -triple=arm64e-apple-macosx -filetype=obj -o %t.o %s2# RUN: llvm-jitlink %t.o3#4# REQUIRES: system-darwin && host=arm64{{.*}}5#6# Check that arm64e ptrauth pass preserves nulls.7#8# Testcase derived from:9#   extern void __attribute__((weak_import)) f(void);10#   void (*p) = &f;11#12#   int main(int argc, char *argv[]) {13#     return p ? 1 : 0;14#   }15 16        .section        __TEXT,__text,regular,pure_instructions17        .globl  _main18        .p2align        219_main:20        adrp    x8, _p@PAGE21        ldr     x8, [x8, _p@PAGEOFF]22        cmp     x8, #023        cset    w0, ne24        ret25 26        .section        __DATA,__data27        .globl  _p28        .p2align        3, 0x029_p:30        .quad   _f@AUTH(ia,0)31 32        .weak_reference _f33        .weak_reference l_f.ptrauth34.subsections_via_symbols35