50 lines · plain
1## Test that the --extern-only switch only shows external ELF symbols.2 3# RUN: yaml2obj %s -o %t.o4# RUN: llvm-nm %t.o --extern-only --no-sort | FileCheck %s5# RUN: llvm-nm %t.o -g --no-sort | FileCheck %s6 7## Using --no-sort ensures that the symbols appear in the symbol table order8## allowing our CHECK-NOTs to work as expected.9# CHECK-NOT: local10# CHECK: D global_data_symbol11# CHECK-NEXT: T global_function_symbol12# CHECK-NEXT: U undefined13# CHECK-NEXT: W weak_symbol14# CHECK-NOT: local15 16--- !ELF17FileHeader:18 Class: ELFCLASS3219 Data: ELFDATA2LSB20 Type: ET_REL21 Machine: EM_38622Sections:23 - Name: .text24 Type: SHT_PROGBITS25 Flags: [SHF_ALLOC, SHF_EXECINSTR]26 - Name: .data27 Type: SHT_PROGBITS28 Flags: [SHF_ALLOC, SHF_WRITE]29Symbols:30 - Name: local_function_symbol31 Binding: STB_LOCAL32 Section: .text33 - Name: local_data_symbol34 Binding: STB_LOCAL35 Section: .data36 - Name: global_data_symbol37 Binding: STB_GLOBAL38 Section: .data39 - Name: global_function_symbol40 Binding: STB_GLOBAL41 Section: .text42 - Name: undefined43 Binding: STB_GLOBAL44 - Name: weak_symbol45 Binding: STB_WEAK46 Section: .data47 - Name: local_at_end48 Binding: STB_LOCAL49 Section: .text50