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