source: mainline/arch/amd64/_link.ld.in@ f76fed4

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since f76fed4 was 42744880, checked in by Jakub Jermar <jakub@…>, 20 years ago

Convert size_t, count_t and index_t to 64-bits on 64-bit architectures.
Change some pfn_t usages to count_t, size_t and index_t.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/** AMD64 linker script
2 *
3 * umapped section:
4 * kernel text
5 * kernel data
6 * mapped section:
7 * kernel text
8 * kernel data
9 */
10
11#define __ASM__
12#include <arch/boot/boot.h>
13#include <arch/mm/page.h>
14
15SECTIONS {
16 .unmapped BOOT_OFFSET: AT (0) {
17 unmapped_ktext_start = .;
18 *(K_TEXT_START);
19 unmapped_ktext_end = .;
20
21 unmapped_kdata_start = .;
22 *(K_DATA_START);
23 unmapped_kdata_end = .;
24 }
25
26 .mapped (PA2KA(BOOT_OFFSET)+SIZEOF(.unmapped)) : AT (SIZEOF(.unmapped)) {
27 ktext_start = .;
28 *(.text);
29 ktext_end = .;
30
31 kdata_start = .;
32 *(.data); /* initialized data */
33 *(.rodata*); /* string literals */
34 hardcoded_load_address = .;
35 QUAD(PA2KA(BOOT_OFFSET));
36 hardcoded_ktext_size = .;
37 QUAD(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start));
38 hardcoded_kdata_size = .;
39 QUAD(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start));
40 hardcoded_unmapped_ktext_size = .;
41 QUAD(unmapped_ktext_end - unmapped_ktext_start);
42 hardcoded_unmapped_kdata_size = .;
43 QUAD(unmapped_kdata_end - unmapped_kdata_start);
44 *(COMMON); /* global variables */
45
46 *(.eh_frame);
47
48 symbol_table = .;
49 *(symtab.*); /* Symbol table, must be LAST symbol!*/
50
51 *(.bss); /* uninitialized static variables */
52
53 kdata_end = .;
54 }
55
56#ifdef CONFIG_SMP
57
58 _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);
59 ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET;
60 ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET;
61 protected_ap_gdtr = PA2KA(ap_gdtr);
62
63#endif /* CONFIG_SMP */
64
65}
Note: See TracBrowser for help on using the repository browser.