1 ## Test that the --extern-only switch only shows external ELF symbols.
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: llvm-nm %t.o --extern-only --no-sort | FileCheck %s
5 # RUN: llvm-nm %t.o -g --no-sort | FileCheck %s
7 ## Using --no-sort ensures that the symbols appear in the symbol table order
8 ## allowing our CHECK-NOTs to work as expected.
10 # CHECK: D global_data_symbol
11 # CHECK-NEXT: T global_function_symbol
12 # CHECK-NEXT: U undefined
13 # CHECK-NEXT: W weak_symbol
25 Flags: [SHF_ALLOC, SHF_EXECINSTR]
28 Flags: [SHF_ALLOC, SHF_WRITE]
30 - Name: local_function_symbol
33 - Name: local_data_symbol
36 - Name: global_data_symbol
39 - Name: global_function_symbol