Rev 268 | Rev 300 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
65 | decky | 1 | /** IA-32 linker script |
1 | jermar | 2 | * |
105 | jermar | 3 | * umapped section: |
4 | * kernel text |
||
5 | * kernel data |
||
6 | * mapped section: |
||
7 | * kernel text |
||
8 | * kernel data |
||
1 | jermar | 9 | */ |
10 | |||
11 | OUTPUT_FORMAT(binary) |
||
12 | ENTRY(kernel_image_start) |
||
13 | |||
14 | SECTIONS { |
||
106 | jermar | 15 | .unmapped 0x8000: AT (0x8000) { |
16 | unmapped_ktext_start = .; |
||
17 | *(K_TEXT_START); |
||
110 | jermar | 18 | *(K_TEXT_START_2); |
106 | jermar | 19 | unmapped_ktext_end = .; |
267 | decky | 20 | |
106 | jermar | 21 | unmapped_kdata_start = .; |
22 | *(K_DATA_START); |
||
23 | unmapped_kdata_end = .; |
||
24 | } |
||
267 | decky | 25 | |
26 | .mapped (0x80100000+0x8000+SIZEOF(.unmapped)): AT (0x8000+SIZEOF(.unmapped)) { |
||
106 | jermar | 27 | ktext_start = .; |
243 | palkovsky | 28 | *(BOOT_DATA) |
106 | jermar | 29 | *(.text); |
30 | ktext_end = .; |
||
267 | decky | 31 | |
106 | jermar | 32 | kdata_start = .; |
33 | *(.data); /* initialized data */ |
||
34 | *(.rodata*); /* string literals */ |
||
35 | *(COMMON); /* global variables */ |
||
216 | palkovsky | 36 | hardcoded_load_address = .; |
235 | decky | 37 | LONG(0x80108000); |
216 | palkovsky | 38 | hardcoded_ktext_size = .; |
39 | LONG(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start)); |
||
40 | hardcoded_kdata_size = .; |
||
41 | LONG(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start)); |
||
267 | decky | 42 | hardcoded_unmapped_ktext_size = .; |
43 | LONG(unmapped_ktext_end - unmapped_ktext_start); |
||
44 | hardcoded_unmapped_kdata_size = .; |
||
45 | LONG(unmapped_kdata_end - unmapped_kdata_start); |
||
106 | jermar | 46 | *(.bss); /* uninitialized static variables */ |
47 | *(K_DATA_END); |
||
268 | palkovsky | 48 | |
49 | symbol_table = .; |
||
50 | *(symtab.*); /* Symbol table, must be LAST symbol!*/ |
||
51 | |||
106 | jermar | 52 | kdata_end = .; |
53 | } |
||
235 | decky | 54 | |
55 | _hardcoded_kernel_size = (ktext_end - ktext_start) + (unmapped_ktext_end - unmapped_ktext_start) + (kdata_end - kdata_start) + (unmapped_kdata_end - unmapped_kdata_start); |
||
285 | decky | 56 | _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start); |
267 | decky | 57 | |
243 | palkovsky | 58 | _map_address = 0x80100000; |
59 | e820table_boot = e820table - _map_address; |
||
60 | e820counter_boot = e820counter - _map_address; |
||
1 | jermar | 61 | } |