[PATCH] D61117: Fix Bug 41353 - unique symbols printed as D instead of u

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 01:45:59 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-nm/X86/unique.test:1
+## Check that we print 'u' for unique symbols
+# RUN: yaml2obj < %s | llvm-nm - | FileCheck %s
----------------
Nit: missing trailing full stop.


================
Comment at: llvm/test/tools/llvm-nm/X86/unique.test:13
+    Type:  SHT_PROGBITS
+    Flags: [ SHF_WRITE, SHF_ALLOC ]
+Symbols:         
----------------
If the flags aren't relevant to the resolution of the symbol, I suggest getting rid of them entirely.


================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:911-912
       return 'b';
+    if (Binding == ELF::STB_GNU_UNIQUE)
+      return 'u';
     if (Flags & ELF::SHF_ALLOC)
----------------
I don't know how realistic this is, but is this the right order of precedence for unique symbols, compared with GNU nm? In other words, do executable and NOBITS sections containing these symbols result in 't'/'b'?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61117/new/

https://reviews.llvm.org/D61117





More information about the llvm-commits mailing list