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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 16:01:33 PST 2016

On Fri, Feb 5, 2016 at 2:10 PM, George Rimar <grimar at accesssoftek.com>

> grimar added a comment.
> In http://reviews.llvm.org/D16924#345138, @ruiu wrote:
> > If you want to start working on the linker script support, can you start
> from writing a proposal about the overall design? It needs to be simple,
> easy to implement, and fast. I have a few > ideas for that, but I don't
> have enough time to think deeply about them. Feel free to discuss your idea
> with me.
> I am not sure I can write good overall design for LS. I just hoped to go
> step by step.
> For example I thought about implementation of location counter basing on
> this one patch.
> But I have no global idea how this should work, linker script is very huge
> and I am not familiar with it it actually. I just can't imagine the whole
> picture right now.
> If you have any ideas with what I can help with (not only LS, but actually
> any linker relative tasks), please feel free to share with me, I probably
> will be able to work on something.

It is totally ok and desirable to do it step-by-step, but you still want to
have some idea where you are going to go with each patch. It doesn't have
to be a super clear idea because there is always something you can't find
until you actually write code. When you start implementing a large feature,
it is always good to stop and think about what the final design would look
like. For example, when I started writing this new linker, I had an idea
about what are important data structures (that materialized as Symbol,
SymbolBody, Sections, SymbolTable, etc.) and how they should interact,
although some parts were not clear. If your design is good, then missing
pieces will be filled almost automatically (or, we call such design a good
design, so this statement is always true by definition, though).

If you don't have an idea of the overall design, you can experiment to
learn. You may want to do that if you are not sure what the final design
would be. The important thing in doing experimentation is to tackle the
largest problem you have instead of small ones -- you don't need any
experimentation for something that you already know you can do. So, in
either way, starting from the expression evaluator is not a good first step
towards the full linker script support.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160205/b686febb/attachment.html>

More information about the llvm-commits mailing list