[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 05:17:14 PDT 2020


Higuoxing updated this revision to Diff 250527.
Higuoxing added a comment.

Fix Harbormaster build


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,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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76213.250527.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200316/6c3f6caf/attachment.bin>


More information about the llvm-commits mailing list