[LLVMdev] LLD improvement plan

Meador Inge meadori at gmail.com
Tue May 5 06:48:07 PDT 2015


On Mon, May 04, 2015 at 10:15:51PM +0000, Eric Christopher wrote:

> Linker scripts are worse than everything - except for the alternatives that
> we know about. Any particular suggestions here?

I very much care about the functionality provided by linker scripts (for
embedded systems and kernel work), but I do agree that most current
script formats are hard to use, debug, reason about, etc...  I have
often wondered whether embedding Python might be a better choice.

Take a look at how debuggers have migrated through the years.  They too
used to have their own script format.  Now most (all?) popular debuggers
do scripting through embedding an actual programming language.  This
could be a better way forward for linkers as well -- embed Python in the
linker, define a Python API for linkable item placement, entry point,
symbol operations, etc..., and then you also have the rest of Python at
your fingertips.

-- Meador



More information about the llvm-dev mailing list