We sometimes need to iterate over input sections for a given
output section. It is not very convinent because we have to iterate
over section descriptions.
Patch introduces getInputSections helper, it simplifies things.
Details
Diff Detail
Event Timeline
LGTM
ELF/SyntheticSections.cpp | ||
---|---|---|
2582–2584 | Please write it with a regular for-loop instead of a higher-order function. |
Thanks ! btw, it turns out getInputSections could be just a member of OutputSection. Should we do that ?
lld/trunk/ELF/Writer.cpp | ||
---|---|---|
1395 ↗ | (On Diff #135378) | This isn't a direct equivalent of what was there before, as it only takes account of InputSectionDescription commands, and not other commands, such as BYTE() or symbol assignments. This has an effect on the layout, though I haven't conclusively determined what (it affects the "Rank" somehow). See PR36475. |
lld/trunk/ELF/Writer.cpp | ||
---|---|---|
1395 ↗ | (On Diff #135378) | You right. |
lld/trunk/ELF/Writer.cpp | ||
---|---|---|
1395 ↗ | (On Diff #135378) | Moreover it seems for me that previous behavior probably was not quite right as we used flags from dead synthetic sections I believe. |
Please write it with a regular for-loop instead of a higher-order function.