<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 5, 2016 at 11:37 AM, Davide Italiano <span dir="ltr"><<a href="mailto:dccitaliano@gmail.com" target="_blank">dccitaliano@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">davide added a comment.<br>
<span><br>
In <a href="http://reviews.llvm.org/D16924#345171" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16924#345171</a>, @grimar wrote:<br>
<br>
> In <a href="http://reviews.llvm.org/D16924#345148" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16924#345148</a>, @davide wrote:<br>
><br>
> > 100% agree. I'd also like to point out that even very complex linker scripts (as the one used by kernels) don't rely on this feature. I'm strongly opposed to see this in until some real consumer shows up. I'm in general opposed to having any linker script directive parsed properly until there's a real use case.<br>
> >  I can't stress enough that I'm disturbed by how badly linker script language "specification" evolved over time.<br>
><br>
><br>
> Real use case for expressions is everywhere in linkerscript. ASSERT was implemented just for validation of results.<br>
<br>
<br>
</span>Sure. Expressions are used. My point is that it's better to support a subset of operators (at least in the beginning) rather than the whole set. If you look at the linker script posted by Ed, you'll notice only a small number of operators is really required. I'm not really familiar with Linux kernel linker script but I'd be really surprised if they make use of all the operators you implemented. I may be wrong.<br>
<br>
In any case, I think we're still away from supporting such level of complexity and I'm inclined to keep the linker script code simple enough for people to contribute.<br></blockquote><div><br></div><div>I agree. The technical challenge to support the linker script is to plumb it to many places in the linker in an efficient/readable way and not calculating values. I want to see a patch or a proposal that solves the difficult problem first. Adding code before doing that would slow down you and other people.</div></div></div></div>