2008-03-27 23:58:03 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
ENTRY(start)
|
|
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
|
|
|
OUTPUT_ARCH(arm)
|
2008-04-29 06:19:32 +00:00
|
|
|
STARTUP(target/arm/s3c2440/crt0.o)
|
2008-03-27 23:58:03 +00:00
|
|
|
|
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000)
|
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
#define DRAMORIG 0x00000000
|
|
|
|
#define IRAMORIG 0x40000000
|
|
|
|
#define IRAMSIZE 4K
|
|
|
|
#define FLASHORIG 0x00000000
|
2008-03-27 23:58:03 +00:00
|
|
|
#define FLASHSIZE 1M
|
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
MEMORY
|
2008-03-27 23:58:03 +00:00
|
|
|
{
|
2008-04-22 04:34:25 +00:00
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
|
|
|
}
|
2008-03-27 23:58:03 +00:00
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.vectors DRAMORIG :
|
|
|
|
{
|
|
|
|
_vectorstart = .;
|
|
|
|
*(.vectors*);
|
2008-03-27 23:58:03 +00:00
|
|
|
*(.init.text)
|
2008-04-22 04:34:25 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.text :
|
|
|
|
{
|
|
|
|
_textstart = .;
|
|
|
|
*(.text)
|
2008-03-27 23:58:03 +00:00
|
|
|
*(.text*)
|
2008-04-22 04:34:25 +00:00
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
2008-03-27 23:58:03 +00:00
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
_textcopy = LOADADDR(.text);
|
|
|
|
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata) /* problems without this, dunno why */
|
|
|
|
*(.rodata*)
|
|
|
|
*(.rodata.str1.1)
|
|
|
|
*(.rodata.str1.4)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.data :
|
|
|
|
{
|
|
|
|
*(.data*)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.eh_frame)
|
|
|
|
}
|
|
|
|
|
|
|
|
.iram :
|
|
|
|
{
|
|
|
|
_iramstart = .;
|
2008-03-27 23:58:03 +00:00
|
|
|
*(.icode)
|
|
|
|
*(.irodata)
|
|
|
|
*(.idata)
|
2008-04-22 04:34:25 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
_iramend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
_iramcopy = LOADADDR(.iram);
|
|
|
|
|
|
|
|
.ibss :
|
|
|
|
{
|
|
|
|
_iedata = .;
|
|
|
|
*(.ibss)
|
2008-03-27 23:58:03 +00:00
|
|
|
. = ALIGN(0x4);
|
2008-04-22 04:34:25 +00:00
|
|
|
_iend = .;
|
|
|
|
} > DRAM
|
2008-03-27 23:58:03 +00:00
|
|
|
|
|
|
|
.stack :
|
|
|
|
{
|
2008-04-22 04:34:25 +00:00
|
|
|
*(.stack)
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
stackend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
_edata = .;
|
|
|
|
*(.bss*)
|
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
2008-03-27 23:58:03 +00:00
|
|
|
}
|