[PATCH] D28559: [ELF] - Do not crash if user section has name equal to one of synthetic sections.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 10:30:44 PST 2017


ruiu added inline comments.


================
Comment at: ELF/InputSection.cpp:38-41
+  // File can absent if section is synthetic.
+  if (!Sec->getFile())
+    return ("'" + Sec->Name + "'").str();
   return (Sec->getFile()->getName() + ":(" + Sec->Name + ")").str();
----------------
If a section is a synthetic section, it's output will be something like

  'foo'

while if it is not, it will be something like

  bar.o:(foo)

So, apparently they are inconsistent in quoting style. That's not good.


https://reviews.llvm.org/D28559





More information about the llvm-commits mailing list