MEMORY
{
  rom          : ORIGIN = 0xBFC00000, LENGTH = 0x00002000  /*   8K    */
  ram          : ORIGIN = 0x40000000, LENGTH = 0x00002000  /*   8K    */
}

OUTPUT_ARCH(mips)
SEARCH_DIR(".");
SEARCH_DIR("/usr/local/mipsel-elf/lib:/usr/local/mipsel-elf/lib/eb");
SEARCH_DIR("/usr/local/lib/gcc/mipsel-elf/4.3.3:/usr/local/lib/gcc/mipsel-elf/4.3.3/eb");

stack_ptr = 0x7FFFEFF0;
baudrate = 0x0D;
sys_led_port = 0xA0000000;
sys_uart_data = 0xA0010000;
sys_uart_stat = 0xA0010004;
sys_uart_baud = 0xA0010008;
sys_timer_usec = 0xA000008;
sys_timer_sec = 0xA000000C;


SECTIONS
{
   .init ORIGIN(rom) :
   {
      start = ALIGN(4);
      entry = ALIGN(4);
      _entry = ALIGN(4);
      __entry = ALIGN(4);
     *(.stext)
   }  > rom
   
   .ktext ORIGIN(rom) + 0x180 :
   {
     *(.ktext)
   }  > rom

   .text . :
   {
     *(.text)
   }  > rom

   .rodata . :
   {
     *(.rodata*)
   }  > rom

   .data ORIGIN(ram) :
   {
     *(.*data) *(.*bss) *(.*common)
   }  > ram

}
