<div dir="ltr">Hello all,<br><br>I'm implementing a watermarking feature for lld that computes a hash of loadable<br>segments and places the result in a note section. Ongoing work can be found<br>here:<br><br><a href="https://reviews.llvm.org/D70316">https://reviews.llvm.org/D70316</a><br><a href="https://reviews.llvm.org/D66426">https://reviews.llvm.org/D66426</a><br><br>The purpose of this watermark is to enable detection of post-link modifications<br>to the loadable segments of the binary. Such modifications may produce a binary<br>that relies on functionality that is an incidental detail of the OS that may<br>change in a future update and negatively affect the runtime behaviour of the<br>binary.<br><br>As well as identifying reliance on unspecified behaviour, on detection of<br>post-link changes we can then look at improving our tooling to support whatever<br>changes had been applied.<br><br>Its critical for us that the watermark has minimal impact on build time and<br>cryptographic security is not the goal. Hence, xxhash is used as our<br>experiments showed it has minimal overhead.<br><br>Chris<br></div>