<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 2, 2016 at 2:50 PM, Rafael Espíndola <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="">On 2 August 2016 at 17:47, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
> If bfd linker actually accepts arbitrary expressions, I have no objection to<br>
> support that in LLD. My comment to Rafael's patch is to update the comment<br>
> -- passing 0 looks a bit odd but understandable, so I'd rather want you to<br>
> mention in the comment that bfd supports arbitrary expressions so do we.<br>
<br>
</span>Will do, but note that it is a bit more than just odd. It means that things like<br>
<br>
PHDRS<br>
{<br>
  ph_foo PT_LOAD FLAGS(. | 2);<br>
}<br>
<br>
SECTIONS<br>
{<br>
  .text : {*(.dynamic) } : ph_foo<br>
}<br>
<br>
<br>
will "work". Amusingly ld.bfd does it too, so it would actually be bug<br>
for bug compatible.<br></blockquote><div><br></div><div>I'm pretty sure that it's not an intended effect but just a result of cutting corners because there is no sane way to use "." in that context.</div></div></div></div>