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

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 16:16:47 PDT 2019


jakehehrlich added a comment.

In D59531#1440434 <https://reviews.llvm.org/D59531#1440434>, @MaskRay wrote:

> 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.


He says there is no precedent or requirement for such a thing and no reason to add such a requirement. Notes are assumed by linkers to have alignment of 4. Roland thinks both produce some unparsable PT_NOTE segments but only in the case where alignment isn't 4 or 8.


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

https://reviews.llvm.org/D59531





More information about the llvm-commits mailing list