diff --git a/llvm/test/tools/llvm-nm/debug-syms.test b/llvm/test/tools/llvm-nm/debug-syms.test --- a/llvm/test/tools/llvm-nm/debug-syms.test +++ b/llvm/test/tools/llvm-nm/debug-syms.test @@ -1,6 +1,19 @@ # RUN: yaml2obj %s -o %t.o -# RUN: llvm-nm --debug-syms %t.o | FileCheck %s --implicit-check-not U -# RUN: llvm-nm -a %t.o | FileCheck %s --implicit-check-not U +# RUN: llvm-nm --debug-syms %t.o | FileCheck %s --implicit-check-not U --check-prefix SYMBOL +# RUN: llvm-nm -a %t.o | FileCheck %s --implicit-check-not U --check-prefix SYMBOL + +# SYMBOL: $a +# SYMBOL-NEXT: $d +# SYMBOL-NEXT: $t +# SYMBOL-NEXT: file_sym +# SYMBOL-NEXT: section + +# RUN: llvm-nm --debug-syms --dynamic %t.o | FileCheck %s --implicit-check-not U --check-prefix DYNSYM +# RUN: llvm-nm --debug-syms -D %t.o | FileCheck %s --implicit-check-not U --check-prefix DYNSYM + +# DYNSYM: dynglobal +# DYNSYM-NEXT: dynlocal + !ELF FileHeader: @@ -24,9 +37,11 @@ Section: section - Name: $a Section: section - -# CHECK: $a -# CHECK-NEXT: $d -# CHECK-NEXT: $t -# CHECK-NEXT: file_sym -# CHECK-NEXT: section +DynamicSymbols: + - Name: dynlocal + Type: STT_OBJECT + Section: section + - Name: dynglobal + Type: STT_OBJECT + Section: section + Binding: STB_GLOBAL