Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / encryption-info.s
blobfc97d0f88d360e3716cce223d4e57253cc120a10
1 # REQUIRES: aarch64, x86
2 # RUN: rm -rf %t; mkdir -p %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/test.o
4 # RUN: llvm-mc -filetype=obj -triple=arm64_32-apple-watchos %s -o %t/watchos-test.o
6 # RUN: %lld -lSystem -o %t/test %t/test.o
7 # RUN: llvm-objdump --macho --all-headers %t/test | FileCheck %s --check-prefix=NO-ENCRYPTION -DSUFFIX=_64
9 # RUN: %lld -lSystem -encryptable -o %t/test %t/test.o
10 # RUN: llvm-objdump --macho --all-headers %t/test | FileCheck %s --check-prefix=ENCRYPTION -DSUFFIX=_64 -D#PAGE_SIZE=4096
12 # RUN: %lld-watchos -lSystem -o %t/watchos-test %t/watchos-test.o
13 # RUN: llvm-objdump --macho --all-headers %t/watchos-test | FileCheck %s --check-prefix=ENCRYPTION -DSUFFIX= -D#PAGE_SIZE=16384
15 # RUN: %lld-watchos -lSystem -no_encryption -o %t/watchos-test %t/watchos-test.o
16 # RUN: llvm-objdump --macho --all-headers %t/watchos-test | FileCheck %s --check-prefix=NO-ENCRYPTION -DSUFFIX=
18 # ENCRYPTION: segname __TEXT
19 # ENCRYPTION-NEXT: vmaddr
20 # ENCRYPTION-NEXT: vmsize
21 # ENCRYPTION-NEXT: fileoff 0
22 # ENCRYPTION-NEXT: filesize [[#TEXT_SIZE:]]
24 # ENCRYPTION: cmd LC_ENCRYPTION_INFO[[SUFFIX]]{{$}}
25 # ENCRYPTION-NEXT: cmdsize
26 # ENCRYPTION-NEXT: cryptoff [[#PAGE_SIZE]]
27 # ENCRYPTION-NEXT: cryptsize [[#TEXT_SIZE - PAGE_SIZE]]
28 # ENCRYPTION-NEXT: cryptid 0
30 # NO-ENCRYPTION-NOT: LC_ENCRYPTION_INFO[[SUFFIX]]{{$}}
32 .globl _main
33 .p2align 2
34 _main:
35 ret