/** AMD64 linker script * * umapped section: * kernel text * kernel data * mapped section: * kernel text * kernel data */ #include #include SECTIONS { kernel_load_address = PA2KA(BOOT_OFFSET); .unmapped (BOOT_OFFSET + SIZEOF_HEADERS): AT (BOOT_OFFSET + SIZEOF_HEADERS) { unmapped_start = .; *(K_TEXT_START); *(K_DATA_START); *(K_INI_PTLS); unmapped_end = .; } .mapped (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS + SIZEOF(.unmapped)) : AT (BOOT_OFFSET + SIZEOF_HEADERS + SIZEOF(.unmapped)) { ktext_start = .; *(.text .text.*); ktext_end = .; kdata_start = .; *(.data); /* initialized data */ *(.rodata .rodata.*); /* string literals */ *(COMMON); /* global variables */ /* bss can't be omitted from the ELF image. */ *(.bss); /* uninitialized static variables */ . = ALIGN(8); symbol_table = .; *(symtab.*); /* Symbol table, must be LAST symbol!*/ kdata_end = .; } #ifdef CONFIG_LINE_DEBUG .comment 0 : { *(.comment); } .debug_abbrev 0 : { *(.debug_abbrev); } .debug_aranges 0 : { *(.debug_aranges); } .debug_info 0 : { *(.debug_info); } .debug_line 0 : { *(.debug_line); } .debug_loc 0 : { *(.debug_loc); } .debug_pubnames 0 : { *(.debug_pubnames); } .debug_pubtypes 0 : { *(.debug_pubtypes); } .debug_ranges 0 : { *(.debug_ranges); } .debug_str 0 : { *(.debug_str); } #endif /DISCARD/ : { *(*); } #ifdef CONFIG_SMP ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET; ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET; protected_ap_gdtr = PA2KA(ap_gdtr); #endif /* CONFIG_SMP */ }