0
|
1 OUTPUT_FORMAT("elf32-littlearm")
|
|
2 OUTPUT_ARCH(arm)
|
|
3 ENTRY(_start)
|
|
4
|
|
5 ENTRY_SVC_STACK_SIZE = 0x1000;
|
|
6
|
|
7 SECTIONS
|
|
8 {
|
|
9 /* the entry point, before enabling paging. The code to enable paing
|
|
10 needs to have the same virtual/physical address. entry.S and start.c
|
|
11 run in this initial setting.*/
|
|
12 . = 0x10000;
|
|
13 .start_sec : {
|
|
14 build/entry.o(.text)
|
|
15 build/start.o(.text .text.*)
|
|
16
|
|
17 build/entry.o(.rodata .rodata.*)
|
|
18 build/start.o(.rodata .rodata.*)
|
|
19
|
|
20 build/entry.o(.data .data.*)
|
|
21 build/start.o(.data .data.*)
|
|
22
|
|
23 PROVIDE(edata_entry = .);
|
|
24
|
|
25 build/entry.o(.bss .bss.* COMMON)
|
|
26 build/start.o(.bss .bss.* COMMON)
|
|
27
|
|
28 /*define a stack for the entry*/
|
|
29 . = ALIGN(0x1000);
|
|
30 . += ENTRY_SVC_STACK_SIZE;
|
|
31
|
|
32 PROVIDE (svc_stktop = .);
|
|
33
|
|
34 /* define the kernel page table, must be 16K and 16K-aligned*/
|
|
35 . = ALIGN(0x4000);
|
|
36 PROVIDE (_kernel_pgtbl = .);
|
|
37 . += 0x4000;
|
|
38
|
|
39 /* we also need a user page table*/
|
|
40 PROVIDE (_user_pgtbl = .);
|
|
41 . += 0x1000;
|
|
42
|
|
43 PROVIDE(end_entry = .);
|
|
44 }
|
|
45
|
|
46 /*the kernel executes at the higher 2GB address space, but loaded
|
|
47 at the lower memory (0x20000)*/
|
|
48 . = 0x80020000;
|
|
49
|
|
50 .text : AT(0x20000){
|
|
51 *(.text .text.* .gnu.linkonce.t.*)
|
|
52 }
|
|
53
|
|
54 PROVIDE(etext = .); /* Define the 'etext' symbol to this value */
|
|
55
|
|
56 .rodata : {
|
|
57 *(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
58 }
|
|
59
|
|
60 /* aligned the data to a (4K) page, so it can be assigned
|
|
61 different protection than the code*/
|
|
62 . = ALIGN(0x1000);
|
|
63
|
|
64 PROVIDE (data_start = .);
|
|
65
|
|
66 .data : {
|
|
67 *(.data .data.*)
|
|
68 }
|
|
69
|
|
70 PROVIDE (edata = .);
|
|
71
|
|
72 .bss : {
|
|
73 *(.bss .bss.* COMMON)
|
|
74 }
|
|
75
|
|
76 . = ALIGN(0x1000);
|
|
77 PROVIDE (end = .);
|
|
78 }
|