1 /** AMD64 linker script
11 #include <arch/boot/boot.h>
12 #include <arch/mm/page.h>
15 .unmapped BOOT_OFFSET: AT (0) {
16 unmapped_ktext_start = .;
18 unmapped_ktext_end = .;
20 unmapped_kdata_start = .;
23 unmapped_kdata_end = .;
26 .mapped (PA2KA(BOOT_OFFSET)+SIZEOF(.unmapped)) : AT (SIZEOF(.unmapped)) {
32 *(.data); /* initialized data */
33 *(.rodata .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 */
48 *(symtab.*); /* Symbol table, must be LAST symbol!*/
50 *(.bss); /* uninitialized static variables */
55 #ifdef CONFIG_LINE_DEBUG
56 .comment 0 : { *(.comment); }
57 .debug_abbrev 0 : { *(.debug_abbrev); }
58 .debug_aranges 0 : { *(.debug_aranges); }
59 .debug_info 0 : { *(.debug_info); }
60 .debug_line 0 : { *(.debug_line); }
61 .debug_loc 0 : { *(.debug_loc); }
62 .debug_pubnames 0 : { *(.debug_pubnames); }
63 .debug_pubtypes 0 : { *(.debug_pubtypes); }
64 .debug_ranges 0 : { *(.debug_ranges); }
65 .debug_str 0 : { *(.debug_str); }
73 _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);
74 ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET;
75 ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET;
76 protected_ap_gdtr = PA2KA(ap_gdtr);
77 #endif /* CONFIG_SMP */