Rev 11 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | jermar | 1 | /* |
2 | * i386 linker script |
||
3 | * |
||
4 | * kernel text |
||
5 | * kernel data |
||
6 | * |
||
7 | */ |
||
8 | |||
9 | OUTPUT_FORMAT(binary) |
||
10 | ENTRY(kernel_image_start) |
||
11 | |||
12 | SECTIONS { |
||
13 | .image 0x8000: AT (0x8000) { |
||
14 | ktext_start = .; |
||
15 | *(K_TEXT_START); |
||
16 | *(.text); |
||
17 | ktext_end = .; |
||
18 | |||
19 | kdata_start = .; |
||
20 | *(K_DATA_START); |
||
21 | *(.data); /* initialized data */ |
||
22 | *(.rodata*); /* string literals */ |
||
23 | *(COMMON); /* global variables */ |
||
24 | *(.bss); /* uninitialized static variables */ |
||
25 | *(K_DATA_END); |
||
26 | kdata_end = .; |
||
27 | } |
||
28 | |||
29 | . = ABSOLUTE(hardcoded_ktext_size); |
||
30 | .patch_1 : { |
||
31 | LONG(ktext_end - ktext_start); |
||
32 | } |
||
33 | |||
34 | . = ABSOLUTE(hardcoded_kdata_size); |
||
35 | .patch_2 : { |
||
36 | LONG(kdata_end - kdata_start); |
||
37 | } |
||
38 | |||
39 | . = ABSOLUTE(hardcoded_load_address); |
||
40 | .patch_3 : { |
||
41 | LONG(0x8000); |
||
42 | } |
||
43 | |||
44 | } |