[PATCH] D61197: [LLD][ELF] Fix getRankProximity to "ignore" not live sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 22:25:27 PDT 2019
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
@phosek I think it is better to commit this than reverting D60131 <https://reviews.llvm.org/D60131> and commiting the two patches again. Rui is probably on holiday..
I think the linker script can be simplified to `SECTIONS { .pad : { QUAD(0); } .text : { *(.text) } .ro : { *(.ro) } }`. PHDRS is not needed.
Hope @grimar can confirm.
================
Comment at: ELF/Writer.cpp:1054
+ auto *Sec = dyn_cast<OutputSection>(B);
+ return (Sec && Sec->Live) ? getRankProximityAux(A, Sec) : -1;
}
----------------
Delete the parentheses?
`COFF/PDB.cpp` contains `C && OS ? C->getRVA() - OS->getRVA() : 0` and there is no parentheses.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61197/new/
https://reviews.llvm.org/D61197
More information about the llvm-commits
mailing list