brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 3ab0939 Raw
54 lines · plain
1## Show that the -j/--just-symbol-name/--format=just-symbols prints only the the2## symbol name.3 4# RUN: yaml2obj %s -o %t.o5 6# RUN: llvm-nm -j %t.o > %t.txt7# RUN: llvm-nm --just-symbol-name %t.o | diff %t.txt -8# RUN: llvm-nm --format=just-symbols %t.o | diff %t.txt -9# RUN: llvm-nm --format=sysv -j %t.o | diff %t.txt -10# RUN: llvm-nm -j --format=posix %t.o | not diff %t.txt -11 12# RUN: FileCheck %s --input-file=%t.txt --implicit-check-not={{.}} --check-prefix=COMMON13 14# COMMON:      {{^}}defined{{$}}15# COMMON-NEXT: {{^}}undefined{{$}}16 17# RUN: llvm-nm -j %t.o %t.o | FileCheck %s --check-prefix=MULTI1 -DFILE=%t.o18 19# MULTI1-NOT:   {{.}}20# MULTI1:       {{^$}}21# MULTI1-NEXT:  [[FILE]]:22# MULTI1-NEXT:  defined23# MULTI1-NEXT:  undefined24# MULTI1-EMPTY:25# MULTI1-NEXT:  [[FILE]]:26# MULTI1-NEXT:  defined27# MULTI1-NEXT:  undefined28# MULTI1-NOT:   {{.}}29 30# RUN: llvm-nm -j --print-file-name %t.o %t.o | FileCheck %s --check-prefix=MULTI2 -DFILE=%t.o31 32# MULTI2-NOT:   {{.}}33# MULTI2:       [[FILE]]: defined34# MULTI2-NEXT:  [[FILE]]: undefined35# MULTI2-NEXT:  [[FILE]]: defined36# MULTI2-NEXT:  [[FILE]]: undefined37# MULTI2-NOT:   {{.}}38 39--- !ELF40FileHeader:41  Class:   ELFCLASS6442  Data:    ELFDATA2LSB43  Type:    ET_REL44Sections:45  - Name:  .text46    Type:  SHT_PROGBITS47    Flags: [ SHF_ALLOC, SHF_EXECINSTR ]48Symbols:49  - Name:    defined50    Section: .text51    Binding: STB_GLOBAL52  - Name:    undefined53    Binding: STB_GLOBAL54