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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 11:49:53 PST 2016


On Fri, Feb 5, 2016 at 11:37 AM, Davide Italiano <dccitaliano at gmail.com>
wrote:

> 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.
>

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160205/d08ad3a8/attachment.html>


More information about the llvm-commits mailing list