[PATCH] D76213: [llvm-nm] Add test for `--debug-syms --dynamic`
Xing via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 03:53:17 PDT 2020
Higuoxing updated this revision to Diff 250504.
Higuoxing added a comment.
Addressed comment.
- Use a single YAML file.
- Test --dynamic/-D
- Remove unrelated/unwanted fields (Default binding, Section)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76213/new/
https://reviews.llvm.org/D76213
Files:
llvm/test/tools/llvm-nm/debug-syms.test
Index: llvm/test/tools/llvm-nm/debug-syms.test
===================================================================
--- llvm/test/tools/llvm-nm/debug-syms.test
+++ llvm/test/tools/llvm-nm/debug-syms.test
@@ -1,6 +1,18 @@
# 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: dynlocal
+# DYNSYM-NEXT: dynglobal
!ELF
FileHeader:
@@ -24,9 +36,9 @@
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
+ - Name: dynglobal
+ Type: STT_OBJECT
+ Binding: STB_GLOBAL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76213.250504.patch
Type: text/x-patch
Size: 1266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200316/728400cf/attachment.bin>
More information about the llvm-commits
mailing list