[PATCH] [lld] [LinkerScript] Implement semantics for simple sections mappings

Rui Ueyama ruiu at google.com
Mon Mar 9 11:48:31 PDT 2015


On Mon, Mar 9, 2015 at 11:42 AM, Shankar Kalpathi Easwaran <
shankarke at gmail.com> wrote:

> ================
> Comment at: lib/ReaderWriter/ELF/DefaultLayout.h:350
> @@ +349,3 @@
> +/// override some of the functionalities.
> +template <class ELFT> class ScriptLayout : public DefaultLayout<ELFT> {
> +public:
> ----------------
> ruiu wrote:
> > shankarke wrote:
> > > rafaelauler wrote:
> > > > ruiu wrote:
> > > > > Merge this with DefaultLayout and remove this class.
> > > > No problem, but first can we get a consensus on whether do we need
> ScriptLayout or not? I'm asking this because I only moved the code out of
> DefaultLayout due to Shankar's solicitation.
> > > DefaultLayout was designed as a class to handle generic ELF Layout
> when not having linker scripts. Some of the linker script usecases are not
> even relevant for the DefaultLayout. Conditionally executing things in the
> DefaultLayout if we have a linker script IMO is a bad design.
> > I'm sorry but I completely disagree. I need to keep an eye on this kind
> of overkill abstraction as the history of this project shows. I spent so
> much time to reduce complexity of the linker, such as removal of
> InputGraph. Don't overdesign class hierarchy. That's going to become
> technical debt.
> I dont think making changes in the DefaultLayout to accomodate
> LinkerScripts is a good idea.
>
> If others / Rafael think its a great idea, please go for it.


Maybe you are not going to be a person to pay technical debt, but others
will (or be suffered).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150309/3132a90a/attachment.html>


More information about the llvm-commits mailing list