[PATCH] D38180: [ELF] - ICF: improve support of SHF_LINK_ORDER sections.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 15:30:40 PDT 2017
ruiu added inline comments.
================
Comment at: ELF/InputSection.cpp:244
+InputSection *InputSectionBase::getLinkOrderSec() const {
+ std::vector<InputSection *> V;
----------------
grimar wrote:
> ruiu wrote:
> > You are assuming that there's up to one dependent section, but are you sure that the assumption is correct? I don't think that's guaranteed by the standard.
> It should not be too hard to change I believe.
> At the same time spec says "A typical use of this flag is to build a table that references text or data sections in address order.", it seems to me one dependency should be sufficient here, though not explicitly said. I suggest to replace the assert (in this method) checking we have only one dependent link order section with an error for now and watch.
> What do you think ?
At least you need to be consistent with your own choice. Support multiple sections or report an error.
https://reviews.llvm.org/D38180
More information about the llvm-commits
mailing list