/*
- * AcessMicro Kernel
+ * Acess2 x86_64 Kernel
* Linker Script
*/
-_kernel_base = 0xFFFF800000000000;
+/* _kernel_base = 0xFFFF800000000000; */
+/* -2 GiB */
+_kernel_base = 0xFFFFFFFF80000000;
-//lowStart = start - _kernel_base;
-ENTRY(start)
+/*
+OUTPUT_FORMAT(elf32-i386)
+OUTPUT_ARCH(i386:x86-64)
+*/
OUTPUT_FORMAT(elf64-x86-64)
+ENTRY(start)
SECTIONS {
. = 0x100000;
+ gKernelBase = .;
+ . += SIZEOF_HEADERS;
__load_addr = .;
.multiboot : AT(ADDR(.multiboot)) {
*(.multiboot)
.usertext ALIGN(0x1000): AT(ADDR(.usertext) - _kernel_base) {
_UsertextBase = .;
*(.usertext)
+ _UsertextEnd = .;
}
- _UsertextEnd = .;
.rodata ALIGN(0x1000): AT(ADDR(.rodata) - _kernel_base) {
*(.initpd)
- *(.rodata)
+ *(.rodata .rodata.*)
*(.rdata)
+
+ . = ALIGN(0x10);
gKernelModules = .;
*(KMODULES)
gKernelModulesEnd = .;
- . = ALIGN(4);
+ . = ALIGN(0x10);
gKernelSymbols = .;
*(KEXPORT)
gKernelSymbolsEnd = .;
-
-
- }
- /*
- .debug_abbrev : { *(.debug_abbrev) }
- .debug_info : { *(.debug_info) }
- .debug_line : { *(.debug_line) }
- .debug_loc : { *(.debug_loc) }
- .debug_pubnames : { *(.debug_pubnames) }
- .debug_aranges : { *(.debug_aranges) }
- .debug_ranges : { *(.debug_ranges) }
- .debug_str : { *(.debug_str) }
- .debug_frame : { *(.debug_frame) }
- */
-
- .padata ALIGN (0x1000) : AT(ADDR(.padata) - _kernel_base) {
- *(.padata)
}
.data ALIGN (0x1000) : AT(ADDR(.data) - _kernel_base) {
+ *(.padata)
*(.data)
}
__bss_start = .;
.bss : AT(ADDR(.bss) - _kernel_base) {
- _sbss = .;
*(COMMON)
*(.bss)
- _ebss = .;
}
gKernelEnd = (. + 0xFFF)&0xFFFFFFFFFFFFF000;
}