[llvm] [llvm][ELF] Add ELF header/section header table size statistics (PR #109345)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 11:20:06 PDT 2024


================
@@ -1008,6 +1011,8 @@ void ELFWriter::writeSectionHeaders(const MCAssembler &Asm) {
 
     writeSectionHeader(GroupSymbolIndex, Offsets.first, Size, *Section);
   }
+
+  stats::SectionHeaderBytes += W.OS.tell() - Start;
----------------
MaskRay wrote:

Encoding the value should be fine. It's very unlikely that the value will ever change.

https://github.com/llvm/llvm-project/pull/109345


More information about the llvm-commits mailing list