ENTRY(_start) MEMORY { ram : ORIGIN = 0x80010000 - 0x800, LENGTH = 2M - 0x10000 + 0x800 dcache : ORIGIN = 0x1f800000, LENGTH = 0x400 } _stacktop = ORIGIN(ram) + LENGTH(ram) - 16; _dcache = ORIGIN(dcache); _dcache_end = ORIGIN(dcache) + LENGTH(dcache); _progsize = _imgend - _start; SECTIONS { /* put the exe header at the start, and pad it to 2k */ .exehdr : { * (.exehdr); . = ALIGN(0x800); } >ram .text : { /* the entry point should go first */ * (.startup); * (.text*); } >ram .rodata : { * (.rodata*); } >ram .data : { * (.data*); } >ram _gp = ALIGN(16) + 0x7ff0; .sdata : { * (.sdata*); } >ram .padding : { BYTE(0); . = ALIGN(0x800); } >ram _imgend = .; .bss ALIGN(4) (NOLOAD) : { _bss_start = .; /* .sbss first to be reachable by _gp */ * (.sbss*); * (.bss*); * (COMMON) . = ALIGN(4); _bss_end = .; } _end = .; /DISCARD/ : { *(.note.GNU-stack); *(.comment); } }