3 # RUN: rm -rf %t; split-file %s %t
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/basic.s -o %t/basic.o
6 # RUN: %lld -lSystem %t/basic.o -o %t/basic
7 # RUN: llvm-objdump --syms %t/basic > %t/objdump
8 # RUN: llvm-objdump --macho --function-starts %t/basic >> %t/objdump
9 # RUN: FileCheck %s --check-prefix=BASIC < %t/objdump
11 # BASIC-LABEL: SYMBOL TABLE:
12 # BASIC-NEXT: [[#%x,MAIN:]] g F __TEXT,__text _main
13 # BASIC-NEXT: [[#%x,F1:]] g F __TEXT,__text _f1
14 # BASIC-NEXT: [[#%x,F2:]] g F __TEXT,__text _f2
20 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/alias.s -o %t/alias.o
21 # RUN: %lld -lSystem %t/alias.o -o %t/alias
22 # RUN: llvm-objdump --syms %t/alias > %t/objdump
23 # RUN: llvm-objdump --macho --function-starts %t/alias >> %t/objdump
24 # RUN: FileCheck %s --check-prefix=ALIAS < %t/objdump
26 # ALIAS-LABEL: SYMBOL TABLE:
27 # ALIAS-NEXT: [[#%x,F2:]] l F __TEXT,__text _f2
28 # ALIAS-NEXT: [[#%x,MAIN:]] g F __TEXT,__text _main
29 # ALIAS-NEXT: [[#%x,F1:]] g F __TEXT,__text _f1
34 # RUN: %lld %t/basic.o -no_function_starts -o %t/basic-no-function-starts
35 # RUN: llvm-objdump --macho --function-starts %t/basic-no-function-starts | FileCheck %s --check-prefix=NO-FUNCTION-STARTS
36 # NO-FUNCTION-STARTS: basic-no-function-starts:
37 # NO-FUNCTION-STARTS-EMPTY:
39 # RUN: %lld -lSystem %t/basic.o -no_function_starts -function_starts -o %t/basic-explicit
40 # RUN: llvm-objdump --syms %t/basic > %t/objdump
41 # RUN: llvm-objdump --macho --function-starts %t/basic >> %t/objdump
42 # RUN: FileCheck %s --check-prefix=BASIC < %t/objdump
44 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/local.s -o %t/local.o
45 # RUN: %lld -lSystem %t/local.o -o %t/local
46 # RUN: llvm-objdump --syms %t/local > %t/objdump
47 # RUN: llvm-objdump --macho --function-starts %t/local >> %t/objdump
48 # RUN: FileCheck %s --check-prefix=LOCAL < %t/objdump
50 # LOCAL-LABEL: SYMBOL TABLE:
51 # LOCAL-NEXT: [[#%x,F1:]] l F __TEXT,__text +[Foo bar]
52 # LOCAL-NEXT: [[#%x,F2:]] l F __TEXT,__text _foo
53 # LOCAL: [[#%x,F3:]] g F __TEXT,__text _main
60 .section __TEXT,__text,regular,pure_instructions
72 .section __TEXT,__text,regular,pure_instructions
82 .section __TEXT,__text