[PATCH] D52749: [LLD][COFF] Fix ordering of CRT global initializers in COMDAT sections

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 3 13:27:01 PDT 2018


mstorsjo added a comment.

With those minor remarks, this patch is ok with me, but I'll let @rnk or @ruiu do the actual approval.



================
Comment at: COFF/Writer.cpp:736
 
+    log("Processing section " + Pair.first.first + " -> " + Name);
+
----------------
Hmm, this log line might be useful, but might also add quite a significant amount of spam to the verbose log. At least with mingw targets, all comdats have a separate subsection name like `.text$symbolname`.


================
Comment at: COFF/Writer.cpp:745
 
+      // The CRT section contains, among other things, the array of function
+      // pointers that initialize every global variable that is not trivially
----------------
I'd rather have this comment above the function itself. Being this verbose (which in itself is great!) inline in a function makes you lose focus on the overall structure.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52749





More information about the llvm-commits mailing list