|
1 | 1 | ## This test verifies that llvm-objdump correctly prints function starts data.
|
2 | 2 |
|
3 |
| -RUN: llvm-objdump --macho --function-starts %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT --implicit-check-not=_main |
4 |
| -RUN: llvm-objdump --macho --function-starts=addrs %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT --implicit-check-not=_main |
| 3 | +## Note: we read input from stdin instead of from a file, because llvm-objdump prints |
| 4 | +## the filename in its output. If the filename contains the string "_main", then the |
| 5 | +## check will incorrectly get triggered. |
| 6 | + |
| 7 | +RUN: llvm-objdump --macho --function-starts - < %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT --implicit-check-not=_main |
| 8 | +RUN: llvm-objdump --macho --function-starts=addrs - < %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT --implicit-check-not=_main |
5 | 9 | 32-BIT: 00001f40
|
6 | 10 |
|
7 |
| -RUN: llvm-objdump --macho --function-starts=names %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT-NAMES |
| 11 | +RUN: llvm-objdump --macho --function-starts=names - < %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT-NAMES |
8 | 12 | 32-BIT-NAMES: {{^}}_main
|
9 | 13 |
|
10 |
| -RUN: llvm-objdump --macho --function-starts=both %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT-BOTH |
| 14 | +RUN: llvm-objdump --macho --function-starts=both - < %p/Inputs/hello.exe.macho-i386 | FileCheck %s --check-prefix=32-BIT-BOTH |
11 | 15 | 32-BIT-BOTH: 00001f40 _main
|
12 | 16 |
|
13 |
| -RUN: llvm-objdump --macho --function-starts %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT --implicit-check-not=_main |
14 |
| -RUN: llvm-objdump --macho --function-starts=addrs %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT --implicit-check-not=_main |
| 17 | +RUN: llvm-objdump --macho --function-starts - < %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT --implicit-check-not=_main |
| 18 | +RUN: llvm-objdump --macho --function-starts=addrs - < %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT --implicit-check-not=_main |
15 | 19 | 64-BIT: 0000000100000f30
|
16 | 20 |
|
17 |
| -RUN: llvm-objdump --macho --function-starts=names %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT-NAMES |
| 21 | +RUN: llvm-objdump --macho --function-starts=names - < %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT-NAMES |
18 | 22 | 64-BIT-NAMES: {{^}}_main
|
19 | 23 |
|
20 |
| -RUN: llvm-objdump --macho --function-starts=both %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT-BOTH |
| 24 | +RUN: llvm-objdump --macho --function-starts=both - < %p/Inputs/hello.exe.macho-x86_64 | FileCheck %s --check-prefix=64-BIT-BOTH |
21 | 25 | 64-BIT-BOTH: 0000000100000f30 _main
|
22 | 26 |
|
23 |
| -RUN: llvm-strip %p/Inputs/hello.exe.macho-x86_64 -o %t.stripped |
24 |
| -RUN: llvm-objdump --macho --function-starts=both %t.stripped | FileCheck %s --check-prefix=BOTH-STRIPPED |
| 27 | +RUN: llvm-strip %p/Inputs/hello.exe.macho-x86_64 -o %t.stripped |
| 28 | +RUN: llvm-objdump --macho --function-starts=both - < %t.stripped | FileCheck %s --check-prefix=BOTH-STRIPPED |
25 | 29 | BOTH-STRIPPED: 0000000100000f30 ?
|
26 | 30 |
|
27 | 31 | RUN: llvm-strip %p/Inputs/hello.exe.macho-x86_64 -o %t.stripped
|
28 |
| -RUN: llvm-objdump --macho --function-starts=names %t.stripped | FileCheck %s --check-prefix=NAMES-STRIPPED |
29 |
| -NAMES-STRIPPED: function-starts.test.tmp.stripped: |
| 32 | +RUN: llvm-objdump --macho --function-starts=names - < %t.stripped | FileCheck %s --check-prefix=NAMES-STRIPPED |
| 33 | +NAMES-STRIPPED: -: |
30 | 34 | NAMES-STRIPPED-EMPTY:
|
0 commit comments