173
|
1 # REQUIRES: x86
|
|
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
|
|
3 # RUN: lld -flavor darwinnew -o %t %t.o
|
|
4
|
|
5 ## Check for the presence of load commands that are essential for a working
|
|
6 ## executable.
|
|
7 # RUN: llvm-objdump --macho --all-headers %t | FileCheck %s
|
|
8 # CHECK-DAG: cmd LC_DYLD_INFO_ONLY
|
|
9 # CHECK-DAG: cmd LC_SYMTAB
|
|
10 # CHECK-DAG: cmd LC_DYSYMTAB
|
|
11 # CHECK-DAG: cmd LC_MAIN
|
|
12 # CHECK-DAG: cmd LC_LOAD_DYLINKER
|
|
13
|
|
14 ## Check for the absence of load commands that should not be in an executable.
|
|
15 # RUN: llvm-objdump --macho --all-headers %t | FileCheck %s --check-prefix=NCHECK
|
|
16 # NCHECK-NOT: cmd: LC_ID_DYLIB
|
|
17
|
|
18 .text
|
|
19 .global _main
|
|
20 _main:
|
|
21 mov $0, %rax
|
|
22 ret
|