[PATCH] D38321: [ELF] Reset OutputSection size prior to processing linker script commands

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 13:39:55 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/LinkerScript.cpp:627-630
+  // The Size was previously calculated for compressed debug sections. We now
+  // reset it, because unused synthetic sections may have since been removed,
+  // leaving the Size invalid.
+  Sec->Size = 0;
----------------
I think this kind of code is a sign that we compute a value too early. It seems that the real problem is that we compute output section size too early for non-compressed debug sections. We don't need to compute it at all if this function is executed, no?


https://reviews.llvm.org/D38321





More information about the llvm-commits mailing list