[PATCH] D94560: [ELF] report section sizes when output file too large

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 14:23:37 PST 2021


MaskRay added inline comments.


================
Comment at: lld/ELF/Writer.cpp:2878
+    s << "output file too large: " << Twine(fileSize) << " bytes\n"
+      << "Section sizes:\n";
+    for (OutputSection *os : outputSections)
----------------
https://llvm.org/docs/CodingStandards.html#error-and-warning-messages

LLD does not use capitalization.


================
Comment at: lld/ELF/Writer.cpp:2880
+    for (OutputSection *os : outputSections)
+      s << os->name << " " << os->size << "\n";
+    error(s.str());
----------------
(Nit: `" "` can be ' ' (slightly smaller output))


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94560



More information about the llvm-commits mailing list