[PATCH] D16924: [ELF] - Linker script expressions, ASSERT() command.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 11:37:42 PST 2016

davide added a comment.

In http://reviews.llvm.org/D16924#345171, @grimar wrote:

> In http://reviews.llvm.org/D16924#345148, @davide wrote:
> > 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. 
> >  I can't stress enough that I'm disturbed by how badly linker script language "specification" evolved over time.
> Real use case for expressions is everywhere in linkerscript. ASSERT was implemented just for validation of results.

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.

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.


More information about the llvm-commits mailing list