[PATCH] D113106: demangle xcoff label symbol for llvm-nm

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 9 01:02:29 PST 2021


jhenderson added inline comments.


================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:637
+
+  if (!Name.empty() && Name[0] == '.')
+    Name = Name.substr(1);
----------------
DiggerLin wrote:
> jhenderson wrote:
> > Can XCOFF symbols have an empty name? If so, you need a test case for this. If not, you don't need a `Name.empty()` check (but you might want some sort of assertion instead).
> yes, XCOFF symbols can have empty name. it look the yamltoobj do not support a empty symbol Name now @Esme , I can not add the empty symbol name here now. if you not mind I use a binary object file here. I can add the test case.
See my comment in D112450: could you use assembly as your input? If so, I expect you could manage to produce a symbol with an empty name using something equivalent to:
```
"":
.global ""
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113106



More information about the llvm-commits mailing list