Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
r286100 was reverted, so I rebased this patch. Changes are:
- added new input section type (Synthetic) and class SyntheticSection
- added checks for Synthetic section type in InputSection<ELFT>::writeTo() and InputSection<ELFT>::getSize()
Overall looking good.
ELF/InputSection.cpp | ||
---|---|---|
86 ↗ | (On Diff #77198) | Remove else because the last if ends with return. |
ELF/InputSection.h | ||
49 ↗ | (On Diff #77198) | nit: add ',' at end of the last enum. |
ELF/OutputSections.h | ||
599 ↗ | (On Diff #77198) | You are not using InSecAddr. What is this? |
ELF/SyntheticSections.h | ||
27 ↗ | (On Diff #77198) | If all derived classes define this method, use = 0 instead of providing the default empty function. |
ELF/Writer.cpp | ||
857 ↗ | (On Diff #77198) | I want to avoid calling assignOffsets more than once to redo it. It is not only inefficient but also confusing. Could you add this section earlier than this to avoid this function call? |
ELF/OutputSections.h | ||
---|---|---|
599 ↗ | (On Diff #77198) | See OutputSections.cpp : 817 |
ELF/Writer.cpp | ||
857 ↗ | (On Diff #77198) | The problem with .got.plt is that it shouldn't be added if it is empty. Whether or not it is empty is known only after call to scanRelocs(). So if you add it early you'll have to do a fixup procedure later |
LGTM with my previous comments addressed.
ELF/Writer.cpp | ||
---|---|---|
857 ↗ | (On Diff #77198) | OK. Please add this as a comment. |