[PATCH] D59531: [ELF] Produce multiple PT_NOTE segments as needed

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 19:22:48 PDT 2019


MaskRay added a comment.

In D59531#1439899 <https://reviews.llvm.org/D59531#1439899>, @jakehehrlich wrote:

> Roland pointed out that this will be a regression after those special high alignment notes are flushed from the ecosystem (this is apparently a recent addition and the issue will be resolved in the months to come). A possibility is that if we see a note section with greater than 4-byte alignment then we use this method but otherwise fallback to the old method. This means that on Linux binaries for the time being (while this new ABI thing is being flushed out of the ecosystem) will be slightly larger but as soon as its fixed ld.lld will be back to fully functioning. This is a general strategy too because no matter size the notes are, the reader will bump by 4-byte alignment. That seems fine to me and I'll upload that change today hopefully.


Can you ask Roland how valid it is for a `SHT_NOTE` section to have `sh_size%sh_align != 0`? If the scenario isn't realistic, can we just merge adjacent `SHF_ALLOC` `SHT_NOTE` with the same `sh_align`? If there is one, I believe ld.bfd and gold (binutils-gdb trunk) can create `PT_NOTE` segments with unparsable padding.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59531





More information about the llvm-commits mailing list