[PATCH] D17529: ELF: Implement ICF.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 11:04:17 PST 2016
rafael added inline comments.
================
Comment at: ELF/ICF.cpp:120
@@ +119,3 @@
+
+// Returns the number of relocations that S has.
+template <class ELFT> uint64_t ICF<ELFT>::numRels(InputSection<ELFT> *S) {
----------------
The comment is out of date.
================
Comment at: ELF/ICF.cpp:123
@@ +122,3 @@
+ uint64_t Ret = 0;
+ for (size_t I = 0, E = S->RelocSections.size(); I != E; ++I)
+ Ret += S->RelocSections[I]->sh_size;
----------------
Range loop?
================
Comment at: ELF/ICF.cpp:255
@@ +254,3 @@
+ InputSectionBase<ELFT> *SB = B->getRelocTarget(*IB);
+ if (SA == SB)
+ continue;
----------------
Two absolute relocations to different values would show up as equal in here, no?
Same issue for two relocations pointing to different strings.
http://reviews.llvm.org/D17529
More information about the llvm-commits
mailing list