[PATCH] D16816: Calculate correct section sizes for llvm-size

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 2 11:45:11 PST 2016


davide added a comment.

What's the output of binutils size?


================
Comment at: tools/llvm-size/llvm-size.cpp:21
@@ -20,2 +20,3 @@
 #include "llvm/Object/ObjectFile.h"
+#include "llvm/Object/ELFObjectFile.h"
 #include "llvm/Support/Casting.h"
----------------
Unsorted I guess?

================
Comment at: tools/llvm-size/llvm-size.cpp:120
@@ +119,3 @@
+    auto ElfSection = static_cast<ELFSectionRef>(Section);
+    if (ElfSection.getType() == ELF::SHT_NULL ||
+        ElfSection.getType() == ELF::SHT_SYMTAB ||
----------------
No need to call getType() each time.


Repository:
  rL LLVM

http://reviews.llvm.org/D16816





More information about the llvm-commits mailing list