forked from len0rd/rockbox
		
	1) Make use of $gp addressing. This saves some bin size and makes code slightly faster. 2) Substitute jr with simple j instruction in exception handling. Code is small and j can easily encode target address. 3) Remove nop after eret in interrupt handler. According to mips32r2 ISA manual eret does not have branch delay slot. Change-Id: If63feb12eef189f08f7b50c832a8091be5e6f570
		
			
				
	
	
		
			97 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			97 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| #include "config.h"
 | |
| ENTRY(main)
 | |
| OUTPUT_ARCH(mips)
 | |
| STARTUP(atj213x/crt0.o)
 | |
| 
 | |
| MEMORY
 | |
| {
 | |
|     DRAM : ORIGIN = DRAM_ORIG, LENGTH = DRAM_SIZE
 | |
|     IRAM : ORIGIN = IRAM_ORIG, LENGTH = IRAM_SIZE
 | |
| }
 | |
| 
 | |
| SECTIONS
 | |
| {
 | |
|   .init.text :
 | |
|         {
 | |
|             relocstart = .;
 | |
|             oc_codestart = .;
 | |
|             KEEP(*(.init.text*))
 | |
|         } > IRAM
 | |
| 
 | |
|   .icode :
 | |
|         {
 | |
|             *(.icode*)
 | |
|         } > IRAM
 | |
| 
 | |
|   .data :
 | |
| 	{
 | |
|             *(.rodata*)
 | |
| 	    *(.data*)
 | |
|             *(.rel.dyn)
 | |
| 
 | |
|             . = ALIGN(8);
 | |
|             _gp = ABSOLUTE(. + 0x7ff0);
 | |
| 
 | |
|             *(.sdata*)
 | |
| 	} > IRAM
 | |
| 
 | |
|   .bss (NOLOAD) :
 | |
| 	{
 | |
|             bssbegin = .;
 | |
|             *(.sbss*)
 | |
| 	    *(.bss*)
 | |
| 	    *(COMMON)
 | |
|             *(.scommon*)
 | |
|             . = ALIGN(4);
 | |
|             bssend = .;
 | |
| 	} > IRAM
 | |
| 
 | |
|   .exception.tlb_refill (IRAM_ORIG + 0x1000) :
 | |
|         {
 | |
|             _irqbase = .;
 | |
|             KEEP(*(.exception.tlb_refill))
 | |
|         } > IRAM
 | |
| 
 | |
|   .exception.cache_error (IRAM_ORIG + 0x1100) :
 | |
|         {
 | |
|             KEEP(*(.exception.cache_error))
 | |
|         } > IRAM
 | |
| 
 | |
|   .exception.general_exception (IRAM_ORIG + 0x1180) :
 | |
|         {
 | |
|             KEEP(*(.exception.general_exception))
 | |
|         } > IRAM
 | |
| 
 | |
|   .exception.irq (IRAM_ORIG + 0x1200) :
 | |
|         {
 | |
|             KEEP(*(.exception.irq))
 | |
|         } > IRAM
 | |
| 
 | |
|   .text :
 | |
| 	{
 | |
| 	    *(.text*)
 | |
|             . = ALIGN(16);
 | |
|             relocend = .;
 | |
| 	} > IRAM
 | |
| 
 | |
|   .stack (NOLOAD) :
 | |
|         {
 | |
|             . = ALIGN(4);
 | |
|             stackbegin = .;
 | |
|             oc_codeend = .;
 | |
|             oc_stackstart = .;
 | |
|             . += 0x2000;
 | |
|             stackend = .;
 | |
| 
 | |
|             irqstackbegin = .;
 | |
|             . += 0x400;
 | |
|             irqstackend = .;
 | |
|             oc_stackend = .;
 | |
|             oc_bufferstart = .;
 | |
|         } > IRAM
 | |
| 
 | |
|   .end IRAM_ORIG+IRAM_SIZE (NOLOAD) :
 | |
|   {
 | |
|       oc_bufferend = .;
 | |
|   } > IRAM
 | |
| }
 |