<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><span>> Linker scripts are worse than everything - except for the alternatives that<br>
> we know about. Any particular suggestions here?<br>
<br>
</span>I very much care about the functionality provided by linker scripts (for<br>
embedded systems and kernel work), but I do agree that most current<br>
script formats are hard to use, debug, reason about, etc...  I have<br>
often wondered whether embedding Python might be a better choice.<br>
<br>
Take a look at how debuggers have migrated through the years.  They too<br>
used to have their own script format.  Now most (all?) popular debuggers<br>
do scripting through embedding an actual programming language.  This<br>
could be a better way forward for linkers as well -- embed Python in the<br>
linker, define a Python API for linkable item placement, entry point,<br>
symbol operations, etc..., and then you also have the rest of Python at<br>
your fingertips.</blockquote><div><br></div><div>I mostly care about specifying address where specific symbols will be placed and specifying the memory layout of the platform.   I normally use __attribute__((section(""))) to place the symbols in their own sections and then use the linker script to place the sections at the required addresses.  How would this be accomplished without linker scripts?</div></div><div class="gmail_extra"><br></div></div>