<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 23, 2017 at 7:22 AM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> writes:<br>
<br>
> I took a quick look at BFD linker's source code and I think that is right.<br>
> The GNU linker doesn't say anything about text relocations unless "-z text"<br>
> or "-warn-shared-textrel" is given.<br>
><br>
> So, It think what we should do is this:<br>
><br>
>  - Add "-z textrel" and treat text relocations as an error only when that<br>
> option is given, and<br>
>  - emit DT_TEXTREL if an output has text relocations.<br>
><br>
> We don't need to add -warn-shared-textrel at the moment. (We may want it<br>
> later, but you want to focus on one thing at a time.)<br>
<br>
</span>I would ask that we keep the default being an error. This is in line<br>
with lld normally being stricter and most of the time a text relocation<br>
will be there because of an user error.<br></blockquote><div><br></div><div>On second thought, I think I agree with you.</div></div></div></div>