Ah right if two notes had larger alignment and the first was not large enough to bridge the gap then we'd hit the same issue with my solution. Peter's solution is in fact the only true solution I think.<div><br></div><div>Sorting notes does seem like a slight improvement however but the true fix should come from multiple PT_NOTE segments<br><br><div class="gmail_quote"><div dir="ltr">On Fri, Mar 8, 2019, 2:02 AM Fangrui Song via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">MaskRay added a comment.<br>
<br>
Peter's suggestion resembles the approach taken by ld.bfd: it can create multiple PT_NOTE segments. I also favor this.<br>
<br>
<br>
Repository:<br>
  rLLD LLVM Linker<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D59120/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D59120/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D59120" rel="noreferrer" target="_blank">https://reviews.llvm.org/D59120</a><br>
<br>
<br>
<br>
</blockquote></div></div>