[PATCH] D43820: [ELF] - Check that output sections fit in address space.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 06:50:13 PST 2018


jhenderson added a comment.

Seems reasonable to me. A few nit comments though.



================
Comment at: ELF/Writer.cpp:1986
 
-// Check for overlapping sections
+// Check for overlapping sections and addresses overflows.
 //
----------------
addresses -> address


================
Comment at: ELF/Writer.cpp:1992-1993
 template <class ELFT> void Writer<ELFT>::checkNoOverlappingSections() {
-  // First check for overlapping file offsets. In this case we need to skip
+  // First, check that section's VAs fit in available address
+  // space for target.
+  for (OutputSection *OS : OutputSections) {
----------------
This comment looks like it's wrapped early?


================
Comment at: ELF/Writer.cpp:2004-2005
+
+  // Check for overlapping file offsets. In this case we need to skip
   // Any section marked as SHT_NOBITS. These sections don't actually occupy
   // space in the file so Sec->Offset + Sec->Size can overlap with others.
----------------
Ditto comment wrapping. Also "Any" -> "any".


https://reviews.llvm.org/D43820





More information about the llvm-commits mailing list