[PATCH] D60502: [llvm-nm] Add --special-syms

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 04:00:49 PDT 2019


evgeny777 created this revision.
evgeny777 added reviewers: jakehehrlich, jhenderson, rupprecht.

This flag is currently missing in llvm-nm, so I'd like to add it for compatibility with existing build scripts.


https://reviews.llvm.org/D60502

Files:
  test/tools/llvm-nm/X86/nm-no-symbols.test
  tools/llvm-nm/llvm-nm.cpp


Index: test/tools/llvm-nm/X86/nm-no-symbols.test
===================================================================
--- test/tools/llvm-nm/X86/nm-no-symbols.test
+++ test/tools/llvm-nm/X86/nm-no-symbols.test
@@ -2,6 +2,9 @@
 # RUN: llvm-nm %t.o 2>&1 | FileCheck %s
 # RUN: llvm-nm --print-file-name %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-PRINT-FILE-NAME
 
+# Check that --special-syms doesn't trigger error
+# RUN: llvm-nm --special-syms %t.o 2>&1 | FileCheck %s
+
 !ELF
 FileHeader:
   Class:           ELFCLASS64
Index: tools/llvm-nm/llvm-nm.cpp
===================================================================
--- tools/llvm-nm/llvm-nm.cpp
+++ tools/llvm-nm/llvm-nm.cpp
@@ -164,6 +164,9 @@
 cl::alias JustSymbolNames("j", cl::desc("Alias for --just-symbol-name"),
                           cl::aliasopt(JustSymbolName), cl::Grouping);
 
+cl::opt<bool> SpecialSyms("special-syms",
+                          cl::desc("No-op. Used for GNU compatibility only"));
+
 // FIXME: This option takes exactly two strings and should be allowed anywhere
 // on the command line.  Such that "llvm-nm -s __TEXT __text foo.o" would work.
 // But that does not as the CommandLine Library does not have a way to make


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60502.194471.patch
Type: text/x-patch
Size: 1215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190410/da2b978c/attachment.bin>


More information about the llvm-commits mailing list