MEMORY
{
  samsbanked (rx) : ORIGIN = 0xA000, LENGTH = 0x2000 /* 8k code space */
  ram        (wx) : ORIGIN = 0xC000, LENGTH = 0x2000 /* next 8k upper ram, last is paged SAMS */
}

/* memcpy will be called by the compiler in some implicit situations. */
/*  use the well known address of this routine in the Force Command module */
/*  it is at this address in every bank of the cartridge ROM */
memcpy = 0x605a;

SECTIONS
{
  OVERLAY : AT (0x10000)
  {
    .bank0 {
      objects/_header.o(.text)
      objects/b0_*.o(.text)
    }
    .bank1 {
      objects/b1_*.o(.text)
    }
    .bank2 {
      objects/b2_*.o(.text)
    }
  } >samsbanked

  . = 0xC000;

  .data : {
    * (.data);
  } >ram

  .bss  ALIGN(2) : {
    *(.bss);
  } >ram

  __STATS_DATA_BSS = SIZEOF(.data) + SIZEOF(.bss);
  __STATS_BANK_0_SIZE = 8192 - SIZEOF(.bank0);
  __STATS_BANK_1_SIZE = 8192 - SIZEOF(.bank1);
  __STATS_BANK_2_SIZE = 8192 - SIZEOF(.bank2);
}
