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

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 06:34:02 PDT 2019


peter.smith added a comment.

My first reaction is that this seems to be quite a bit of a platform specific feature to build into the linker, it could also make the platform dependent on LLD if this didn't also get into binutils or other ELF linkers. An alternative approach which I believe has been used in other platforms before (for example https://people.freebsd.org/~tmm/elfcksum.c) is to reserve some empty space in the binary that an external tool can post-process to write any checksum/hash etc that you want into it. This is not as convenient but would be compatible with other linkers and not require a LLVM specific extension to ELF.

If this were to go in I think you'd also need to update:

- https://llvm.org/docs/Extensions.html with the format of note.llvm.watermark
- The help and docs for LLD.


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

https://reviews.llvm.org/D66426





More information about the llvm-commits mailing list