title: load script to load a section at the top of a memory region
body: <p>I'm working on a project for an embedded system, using an ARM M0.</p>
  
  <p>A ROM application has to be created, whose sole purpose is to store stuff in rom, and initialize the data and bss sections whenever needed.</p>
  
  <p>The loadscript so far is this: </p>
  
  <pre><code>MEMORY
  {
    rom (rx): ORIGIN = 0, LENGTH = 32K ; 
    ram (!rx): ORIGIN = 0x10000, LENGTH = 8K ; 
  }
  
  SECTION
  {
    . = ORIGIN(rom) ;
  
    .text:
    {
      KEEP(*(.text)) ;
    } &gt;.
  
    .data:
    {
      KEEP(*(.data)) ;
    } &gt;ram AT&gt;.
  
    .bss:
    {
      KEEP(*(.bss)) ;
    } &gt; ram = 0x00
  }
  </code></pre>
  
  <p>I want to change the loadscript so that the data and bss portions are loaded into ram at the top of the memory region, not at the bottom.</p>
  
  <p>How can I do that?</p>