<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 23, 2017 at 4:17 PM, Petr Hosek <span dir="ltr"><<a href="mailto:phosek@chromium.org" target="_blank">phosek@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span class=""><div dir="ltr">On Tue, May 23, 2017 at 3:19 PM Rafael Avila de Espindola <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Petr Hosek via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
> One of the design principles we're trying to follow is to make everything<br>
> read-only, unless it has be writable. The only reason for .dynamic to be<br>
> writable is DT_DEBUG which is something we never intend to support. FWIW in<br>
> Fuchsia all we need is a read-only .dynamic without emitting DT_DEBUG<br>
> altogether, but we wanted to make sure that this flag is also usable<br>
> elsewhere hence implementing DT_DEBUG_INDIRECT which is already supported<br>
> by musl as Jake pointed out.<br>
<br>
It might be easier to have an option for making .dynamic be read only<br>
and the logic for emitting DT_DEBUG becomes ".dynamic is rw or mips".<br>
<br>
BTW, dynamic linkers really never relocate the .d_ptr entries?<br></blockquote><div><br></div></span><div>musl's dynamic linker doesn't and neither ours. Older versions of glibc's dynamic linker do, but I'm not sure about the newer ones.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What are you guys using instead of DT_DEBUG?<br></blockquote><div><br></div></span><div>We use other OS-specific runtime means to register that address.</div></div></div></blockquote><div><br></div><div>Do the OS-specific means make sense for other OSes?</div></div></div></div>