[PATCH] D60131: [ELF] Change default output section type to SHT_PROGBITS

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 07:50:43 PDT 2019


andrewng added a comment.

In D60131#1453128 <https://reviews.llvm.org/D60131#1453128>, @jakehehrlich wrote:

> This seems like the wrong fix to me. Shouldn't we be fixing the alignment bug with respect to segments not changing things like this?
>
> If I recall correctly I made a change to make NOBITS the default because some sections nthat could have been NOBITS we're winding up as PROGBITS. I don't remember the exact details. I'm fairly sure this change regresses that point. You've changedna bunch of test from expecting NOBITS to expecting PROGBITS but that seems unjustified.


When I first looked into this issue, I did in fact look at the "layout" side for a potential fix. But as I progressed, it was not clear that it might be the most appropriate (or simplest) fix. So then I investigated why this situation was arising at all and it lead me back to this change of the default output section from SHT_PROGBITS to SHT_NOBITS. I tried to find more details for why this change was made, but couldn't find anything concrete other than the reduction in "file size" which does not appear to benefit the actual file output size in most cases.

If the default output section must be SHT_NOBITS, then an alternative solution will be required, but is this really a requirement?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60131/new/

https://reviews.llvm.org/D60131





More information about the llvm-commits mailing list