During review of D18499 was requested to improve way how
we deal with dummies sections.
This patch does that. Now they are not part of OutputSections list,
but still keeping them as sections helps to simplify the code.
Details
Diff Detail
Event Timeline
Please change the title of this patch to something like "Do not handle ELF and program header as dummy sections", since what you are doing here is not improving the dummy sections but instead removing the concept of that.
ELF/Writer.cpp | ||
---|---|---|
103–104 | It's a bit weird to count the first null entry of the section table as a section. You can just remove this function, no? |
- Addressed review comments.
ELF/Writer.cpp | ||
---|---|---|
103–104 | Removed, but there was 2 places where it was called, I put (OutputSections.size() + 1) there instead: EHdr->e_shnum = OutputSections.size() + 1; FileSize = SectionHeaderOff + (OutputSections.size() + 1) * sizeof(Elf_Shdr); |
Why +1?