<div dir="ltr">LGTM</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 19, 2016 at 1:48 PM, Mark Kettenis via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is the intention that .openbsd.randomdata sections are made<br>
read-only after initialization. The native (ld.bfd based) OpenBSD<br>
toolchain accomplishes this by including .openbsd.randomdata into the<br>
PT_GNU_RELRO segment. The diff below makes ldd do the same.<br>
<br>
Index: ELF/Writer.cpp<br>
==============================<wbr>==============================<wbr>=======<br>
--- ELF/Writer.cpp (revision 290066)<br>
+++ ELF/Writer.cpp (working copy)<br>
@@ -504,7 +504,7 @@<br>
return true;<br>
StringRef S = Sec->getName();<br>
return S == ".<a href="http://data.rel.ro" rel="noreferrer" target="_blank">data.rel.ro</a>" || S == ".ctors" || S == ".dtors" || S == ".jcr" ||<br>
- S == ".eh_frame";<br>
+ S == ".eh_frame" || S == ".openbsd.randomdata";<br>
}<br>
<br>
template <class ELFT><br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>