[PATCH] D16816: Calculate correct section sizes for llvm-size
khemant@codeaurora.org via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 11:57:36 PST 2016
khemant added a comment.
Binutils size outputs similar to BSD. It discounts these sections as well
================
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"
----------------
davide wrote:
> Unsorted I guess?
Correct. Will be putting in right place.
================
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 ||
----------------
davide wrote:
> No need to call getType() each time.
I will be changing this to switch as mgrang mentioned.
Repository:
rL LLVM
http://reviews.llvm.org/D16816
More information about the llvm-commits
mailing list