-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpcboot.ld
More file actions
42 lines (35 loc) · 735 Bytes
/
pcboot.ld
File metadata and controls
42 lines (35 loc) · 735 Bytes
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
OUTPUT_ARCH(i386)
SECTIONS {
/* BIOS loads the boot code at 0000:7c00 */
. = 0x7c00;
.boot : { * (.boot); }
/* second stage boot loader */
.boot2 : {
* (.boot2);
* (.lowtext);
/* .bootend must stay last */
* (.bootend);
/* pad the boot loader to the next sector boundary */
. = ALIGN(512);
}
_boot2_size = SIZEOF(.boot2);
/* main program will be loaded at 1MB by the second stage
* boot loader
*/
. = 1M;
_main_start = .;
.startup : { * (.startup); }
.text : { * (.text); }
.rodata : { * (.rodata); }
.data : { * (.data); }
.bss ALIGN(4): {
_bss_start = .;
* (.bss);
* (COMMON);
. = ALIGN(4);
_bss_end = .;
}
_bss_size = SIZEOF(.bss);
_main_size = . - _main_start;
_mem_start = .;
}