28 lines · plain
1## Show that the --defined-only option omits undefined symbols.2 3# RUN: yaml2obj %s -o %t.o4# RUN: llvm-nm %t.o --defined-only > %t.defonly.txt5# RUN: llvm-nm %t.o -U > %t.U.txt6 7# RUN: cmp %t.defonly.txt %t.U.txt8 9# RUN: FileCheck %s --input-file=%t.defonly.txt --implicit-check-not={{.}}10 11# CHECK: 0000000000000000 T defined12 13--- !ELF14FileHeader:15 Class: ELFCLASS6416 Data: ELFDATA2LSB17 Type: ET_REL18Sections:19 - Name: .text20 Type: SHT_PROGBITS21 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]22Symbols:23 - Name: defined24 Section: .text25 Binding: STB_GLOBAL26 - Name: undefined27 Binding: STB_GLOBAL28