[PATCH] D38180: [ELF] - ICF: improve support of SHF_LINK_ORDER sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 05:05:22 PDT 2017


grimar added inline comments.


================
Comment at: ELF/InputSection.cpp:244
 
+InputSection *InputSectionBase::getLinkOrderSec() const {
+  std::vector<InputSection *> V;
----------------
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 ?


https://reviews.llvm.org/D38180





More information about the llvm-commits mailing list