[PATCH] D66426: [lld] Enable a watermark of loadable sections to be generated and placed in a note section

Chris Jackson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 06:02:13 PST 2019


chrisjackson updated this revision to Diff 230047.
chrisjackson added a reviewer: bd1976llvm.
chrisjackson added a comment.
Herald added a subscriber: mgrang.

@ruiu observed that the watermark computation was reliant on the segment ordering in the ELF file. This ordering can change without affecting the loadable image. Therefore, we now apply an ordering based on the segment's virtual address when calculating the watermark.

@Maskray our linker scripts prevent the watermark note section from being present in PT_LOAD segments. Logic has been added to prevent the section from being used in the watermark computation if it overlaps with a PT_LOAD. SHF_ALLOC has also been removed.

The readobj functionality for the new note section has been moved to D70316 <https://reviews.llvm.org/D70316>.

We carried out extensive tests using an external process to compute the watermark but unfortunately the penalty for accessing the file even when in the system file cache was greater than we are willing to pay.


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

https://reviews.llvm.org/D66426

Files:
  lld/ELF/Config.h
  lld/ELF/Driver.cpp
  lld/ELF/InputFiles.cpp
  lld/ELF/Options.td
  lld/ELF/SyntheticSections.cpp
  lld/ELF/SyntheticSections.h
  lld/ELF/Writer.cpp
  lld/test/ELF/watermark.s
  llvm/include/llvm/BinaryFormat/ELF.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66426.230047.patch
Type: text/x-patch
Size: 13126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191119/5b89ac37/attachment-0001.bin>


More information about the llvm-commits mailing list