<div dir="ltr">Here's my understanding of Joerg's proposal.<br>1) Still allow users to emit a read-only .dynamic section<div>2) Not emit DT_DEBUG in the case of a read-only .dynamic section</div><div>3) Do none of this DT_DEBUG_INDIRECT/<span style="color:rgb(33,33,33)">DT_MIPS_RLD_MAP stuff. We can just allow people to use the AUX vector for this purpose if they need it.<br></span><br>So the changes to LLD would include<br>1) Adding a flag for read-only .dynamic</div><div>2) Changing the flags for .dynamic according to this flag</div><div>3) Not emitting DT_DEBUG if this flag is set.<br><br>I think we'd be fine with that option if everyone agrees to it. I already have a patch which does that in fact (it's a very trivial change). Would everyone be ok with this change?</div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, May 20, 2017 at 4:22 AM Joerg Sonnenberger <<a href="mailto:joerg@bec.de">joerg@bec.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, May 16, 2017 at 11:31:13PM +0000, Jake Ehrlich via llvm-dev wrote:<br>
> The .dynamic section is almost read-only except for the DT_DEBUG entry<br>
> which requires the dynamic linker to modify a word. MIPS has long since had<br>
> a solution to this using the DT_MIPS_RLD_MAP entry to give a pointer to<br>
> another section which is writable. It would be nice to have this<br>
> functionality on other targets as well however.<br>
<br>
Can we take a step back please? I think a much better approach would be<br>
to make the whole DT_DEBUG/DT_MIPS_RLD_MAP optional, not moving from the<br>
former hack to the latter hack. Systems that want to support this new<br>
mechanism reserve an AUX vector similar to AT_BASE and let the dynamic<br>
linker fill it in. No space required in the executable that way.<br>
<br>
Joerg<br>
</blockquote></div>