#include "config.h"
ENTRY(start)
OUTPUT_FORMAT(elf32-littlearm)
OUTPUT_ARCH(arm)
STARTUP(target/arm/imx233/crt0.o)
#define IRAMORIG 0
#define IRAMSIZE 32K
#define DRAMORIG 0x40000000
#define DRAMSIZE (MEMORYSIZE * 0x100000)
#define STACKSIZE 2k
MEMORY
{
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
IRAM0 : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
}
SECTIONS
{
/* We will put Rockbox bootloader at the last 1MByte of the SDRAM. */
/* Example of a section:
* .section VMA(Virtual Memory Address) : LMA(Load Memory Address).
* VMA and LMA addresses can be verified by doing:
* "arm-elf-objdump -h bootloader.elf". */
.text 0 : AT (DRAMORIG + DRAMSIZE - 1M)
{
*(.glue_7)
*(.glue_7t)
*(.text)
*(.text*)
*(.icode)
*(.icode*)
*(.rodata)
*(.rodata*)
. = ALIGN(4);
end_text = .;
}
/* Initialized variables are placed on SDRAM, right after .text section. */
/* Data section: VMA is the same as the LMA, right after the end of .text */
.data . :
{
*(.data)
*(.data*)
. = ALIGN(4);
end_data = .;
}
/* Uninitialized variables are placed at SDRAM, right after .text section. */
.bss (NOLOAD) :
{
bss = .;
*(.bss) /* Bss section contains all uninitialized data generated by the compiler. */
*(.bss*)
*(COMMON)
. = ALIGN(4);
end_bss = .;
}
/* Stack is placed at SDRAM, right after .bss section. */
.stack . :
{
*(.stack)
stackbegin = .;
. += STACKSIZE;
end_stack = .;
}
}