[PATCH] D66426: [lld] Enable a watermark of loadable sections to be generated and placed in a note section
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 12:38:10 PDT 2019
pcc added inline comments.
================
Comment at: lld/ELF/Writer.cpp:2709
+
+ for (PhdrEntry *phdr : mainPart->phdrs) {
+ if (phdr->p_type == PT_LOAD) {
----------------
I guess the right thing to do in the case of multiple partitions would be to compute a separate hash for each partition. But this can always be changed later since the partitions feature is experimental.
================
Comment at: lld/ELF/Writer.cpp:2711
+ if (phdr->p_type == PT_LOAD) {
+ first = std::min(first, phdr->p_offset);
+ last = std::max(last, phdr->p_offset + phdr->p_filesz);
----------------
Should this exclude the ELF headers if present in a segment? The header fields e_shoff, e_shnum and e_shstrndx can and likely must be rewritten by strip and other tools.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66426/new/
https://reviews.llvm.org/D66426
More information about the llvm-commits
mailing list