View difference between Paste ID: anAtfjEe and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | #include "config.h" |
2 | ||
3 | ENTRY(start) | |
4 | OUTPUT_FORMAT(elf32-littlearm) | |
5 | OUTPUT_ARCH(arm) | |
6 | STARTUP(target/arm/imx233/crt0.o) | |
7 | ||
8 | #define IRAMORIG 0 | |
9 | #define IRAMSIZE 32K | |
10 | #define DRAMORIG 0x40000000 | |
11 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | |
12 | #define STACKSIZE 2k | |
13 | ||
14 | MEMORY | |
15 | { | |
16 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | |
17 | IRAM0 : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | |
18 | } | |
19 | ||
20 | SECTIONS | |
21 | { | |
22 | /* We will put Rockbox bootloader at the last 1MByte of the SDRAM. */ | |
23 | ||
24 | /* Example of a section: | |
25 | * .section VMA(Virtual Memory Address) : LMA(Load Memory Address). | |
26 | * VMA and LMA addresses can be verified by doing: | |
27 | * "arm-elf-objdump -h bootloader.elf". */ | |
28 | ||
29 | .text 0 : AT (DRAMORIG + DRAMSIZE - 1M) | |
30 | { | |
31 | *(.glue_7) | |
32 | *(.glue_7t) | |
33 | *(.text) | |
34 | *(.text*) | |
35 | *(.icode) | |
36 | *(.icode*) | |
37 | *(.rodata) | |
38 | *(.rodata*) | |
39 | . = ALIGN(4); | |
40 | end_text = .; | |
41 | } | |
42 | ||
43 | /* Initialized variables are placed on SDRAM, right after .text section. */ | |
44 | /* Data section: VMA is the same as the LMA, right after the end of .text */ | |
45 | .data . : | |
46 | { | |
47 | *(.data) | |
48 | *(.data*) | |
49 | . = ALIGN(4); | |
50 | end_data = .; | |
51 | } | |
52 | ||
53 | /* Uninitialized variables are placed at SDRAM, right after .text section. */ | |
54 | .bss (NOLOAD) : | |
55 | { | |
56 | bss = .; | |
57 | *(.bss) /* Bss section contains all uninitialized data generated by the compiler. */ | |
58 | *(.bss*) | |
59 | *(COMMON) | |
60 | . = ALIGN(4); | |
61 | end_bss = .; | |
62 | } | |
63 | ||
64 | /* Stack is placed at SDRAM, right after .bss section. */ | |
65 | .stack . : | |
66 | { | |
67 | *(.stack) | |
68 | stackbegin = .; | |
69 | . += STACKSIZE; | |
70 | end_stack = .; | |
71 | } | |
72 | } |