[PATCH] D23661: [ELF] Fix sorting in combrelocs mode and add DT_REL(A)COUNT to .dynamic
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 13:34:25 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/OutputSections.cpp:672-674
@@ -664,1 +671,5 @@
+
+ size_t NumRelativeRels = Out<ELFT>::RelaDyn->getRelativeRelocCount();
+ if (Config->ZCombreloc && NumRelativeRels)
+ Add({IsRela ? DT_RELACOUNT : DT_RELCOUNT, NumRelativeRels});
}
----------------
I'm not sure if it is the right thing to not emit DT_REL[A]COUNT if there are no relative relocations. If the number of relative relocations is zero, shouldn't we write zero?
https://reviews.llvm.org/D23661
More information about the llvm-commits
mailing list