-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootrom.ld
executable file
·56 lines (44 loc) · 1.11 KB
/
bootrom.ld
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
OUTPUT_ARCH(mips)
ENTRY(COLD_RESET)
MEMORY {
bin : ORIGIN = 0, LENGTH = 0x2000
rom (rx) : ORIGIN = 0xBFC00000, LENGTH = 0x2000
sram_uc (rwx) : ORIGIN = 0xBFC40000, LENGTH = 0x8000
sram_c (rwx) : ORIGIN = 0x9FC40000, LENGTH = 0x8000
}
SECTIONS {
.text.startup.0 :
{
PROVIDE(COLD_RESET = .);
build/src/boot1.o(.text*)
} > rom AT> bin
STAGE2_ROM_START = .;
.text.startup.1 :
{
build/src/boot2.o(.text*)
} > sram_uc AT> bin
/* Pick up in the cached segment where the prior uncached code ended */
.text (. & 0x1FFFFFFF | 0x80000000) :
{
build/src/boot3.o(.text*)
build/src/boot4.o(.text*)
build/src/sha1.o(.text*)
} > sram_c AT> bin
.data :
{
build/src/boot4.o(.data*)
build/src/sha1.o(.data*)
} > sram_c AT> bin
.rodata :
{
build/src/boot4.o(.rodata*)
build/src/sha1.o(.rodata*)
} > sram_c AT> bin
/* Back to uncached for end symbol */
STAGE2_END = (. & 0x1FFFFFFF | 0xA0000000);
_gp = .;
/DISCARD/ :
{
*(*);
}
}