X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/87067c7f16425837971f5c1b5fd0fc5338757377..1fe5f5eb5378a47bf0f3451762743c162e40faad:/lunaix-os/link/linker.ld diff --git a/lunaix-os/link/linker.ld b/lunaix-os/link/linker.ld index d2d39f0..71bc151 100644 --- a/lunaix-os/link/linker.ld +++ b/lunaix-os/link/linker.ld @@ -11,66 +11,76 @@ SECTIONS { . = 0x100000; /* 这里是我们的高半核初始化代码段和数据段 */ + .boot.text BLOCK(4K) : { + *(.multiboot) + *(.boot.text) + } - .hhk_init_text BLOCK(4K) : { - * (.multiboot) - arch/*.o (.hhk_init) - arch/*.o (.text) + .boot.bss BLOCK(4K) : { + *(.boot.bss) } - .hhk_init_bss BLOCK(4K) : { - arch/*.o (.bss) + .boot.data BLOCK(4K) : { + *(.boot.data) } - .hhk_init_data BLOCK(4K) : { - arch/*.o (.data) + .boot.rodata BLOCK(4K) : { + *(.boot.rodata) } - .hhk_init_rodata BLOCK(4K) : { - arch/*.o (.rodata) + .boot.bss BLOCK(4K) : { + *(.boot.rodata) } - __init_hhk_end = ALIGN(4K); + __kexec_boot_end = ALIGN(4K); /* Relocation of our higher half kernel */ . += 0xC0000000; /* 好了,我们的内核…… */ .text BLOCK(4K) : AT ( ADDR(.text) - 0xC0000000 ) { - __kernel_start = .; - PROVIDE(__ktext_start = .); + __kexec_start = .; + PROVIDE(__kexec_text_start = .); - kernel/*.o (.text) - hal/*.o (.text) - debug/*.o (.text) - libs/*.o (.text) + *(.text) - PROVIDE(__ktext_end = .); + PROVIDE(__kexec_text_end = .); } .data BLOCK(4K) : AT ( ADDR(.data) - 0xC0000000 ) { - kernel/*.o (.data) - hal/*.o (.data) - debug/*.o (.data) - libs/*.o (.data) + *(.data) } .rodata BLOCK(4K) : AT ( ADDR(.rodata) - 0xC0000000 ) { - kernel/*.o (.rodata) - hal/*.o (.rodata) - debug/*.o (.rodata) - libs/*.o (.rodata) + *(.rodata) } .kpg BLOCK(4K) : AT ( ADDR(.kpg) - 0xC0000000 ) { - arch/*.o (.kpg) + *(.kpg) + } + + . = ALIGN(4K); + + /* for generated array, we align to address line size */ + + .lga BLOCK(4K) : AT ( ADDR(.lga) - 0xC0000000 ) { + PROVIDE(__lga_twiplugin_inits_start = .); + + KEEP(*(.lga.twiplugin_inits)); + + PROVIDE(__lga_twiplugin_inits_end = .); + + /* ---- */ + + PROVIDE(__lga_pci_dev_drivers_start = .); + + KEEP(*(.lga.pci_dev_drivers)); + + PROVIDE(__lga_pci_dev_drivers_end = .); } .bss BLOCK(4K) : AT ( ADDR(.bss) - 0xC0000000 ) { - kernel/*.o (.bss) - hal/*.o (.bss) - debug/*.o (.bss) - libs/*.o (.bss) + *(.bss) } - __kernel_end = ALIGN(4K); + __kexec_end = ALIGN(4K); } \ No newline at end of file