X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/81ecfb6240fdd3a8229f0740242612212e062a6c..7c7b5f05d39b7739d990f71256a2267ec67a6913:/lunaix-os/link/linker.ld diff --git a/lunaix-os/link/linker.ld b/lunaix-os/link/linker.ld index 71bc151..f2510aa 100644 --- a/lunaix-os/link/linker.ld +++ b/lunaix-os/link/linker.ld @@ -1,12 +1,5 @@ ENTRY(start_) -/* - FUTURE: Use disk reader - A bit of messy here. - We will pull our higher half kernel out of this shit - and load it separately once we have our disk reader. -*/ - SECTIONS { . = 0x100000; @@ -33,7 +26,10 @@ SECTIONS { } __kexec_boot_end = ALIGN(4K); - /* Relocation of our higher half kernel */ + /* ---- boot end ---- */ + + /* ---- kernel start ---- */ + . += 0xC0000000; /* 好了,我们的内核…… */ @@ -71,11 +67,24 @@ SECTIONS { /* ---- */ + /* align to 8 bytes, so it can cover both 32 and 64 bits address line*/ + . = ALIGN(8); + PROVIDE(__lga_pci_dev_drivers_start = .); KEEP(*(.lga.pci_dev_drivers)); PROVIDE(__lga_pci_dev_drivers_end = .); + + /* ---- */ + + . = ALIGN(8); + + PROVIDE(__lga_platdev_db_start = .); + + KEEP(*(.lga.platdev_db)); + + PROVIDE(__lga_platdev_db_end = .); } .bss BLOCK(4K) : AT ( ADDR(.bss) - 0xC0000000 ) {