mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 02:13:24 +00:00
Move whole kernel ELF to VMA
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
4e1d98a323
commit
ccc4e6ec6b
@ -12,7 +12,7 @@ repository = "https://github.com/asterinas/asterinas"
|
||||
[dependencies.linux-bzimage-builder]
|
||||
git = "https://github.com/asterinas/asterinas"
|
||||
# Make sure it syncs with `crate::util::ASTER_GIT_REV`
|
||||
rev = "cc4111c"
|
||||
rev = "c9b66bd"
|
||||
# When publishing, the crate.io version is used, make sure
|
||||
# the builder is published
|
||||
# FIXME: The version is currently commented out as it is no longer in use.
|
||||
|
@ -8,18 +8,16 @@ KERNEL_VMA = 0xffffffff80000000;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = KERNEL_LMA;
|
||||
. = KERNEL_LMA + KERNEL_VMA;
|
||||
|
||||
__kernel_start = .;
|
||||
|
||||
.multiboot_header : { KEEP(*(.multiboot_header)) }
|
||||
.multiboot2_header : { KEEP(*(.multiboot2_header)) }
|
||||
|
||||
. = LINUX_32_ENTRY;
|
||||
|
||||
.boot : { KEEP(*(.boot)) }
|
||||
.multiboot_header : AT(ADDR(.multiboot_header) - KERNEL_VMA) { KEEP(*(.multiboot_header)) }
|
||||
.multiboot2_header : AT(ADDR(.multiboot2_header) - KERNEL_VMA) { KEEP(*(.multiboot2_header)) }
|
||||
|
||||
. += KERNEL_VMA;
|
||||
. = LINUX_32_ENTRY + KERNEL_VMA;
|
||||
|
||||
.boot : AT(ADDR(.boot) - KERNEL_VMA) { KEEP(*(.boot)) }
|
||||
|
||||
.text : AT(ADDR(.text) - KERNEL_VMA) {
|
||||
*(.text .text.*)
|
||||
@ -71,5 +69,5 @@ SECTIONS
|
||||
|
||||
. = DATA_SEGMENT_END(.);
|
||||
|
||||
__kernel_end = . - KERNEL_VMA;
|
||||
__kernel_end = .;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ use quote::ToTokens;
|
||||
/// and use the published version in the generated Cargo.toml.
|
||||
pub const ASTER_GIT_LINK: &str = "https://github.com/asterinas/asterinas";
|
||||
/// Make sure it syncs with the builder dependency in Cargo.toml.
|
||||
pub const ASTER_GIT_REV: &str = "cc4111c";
|
||||
pub const ASTER_GIT_REV: &str = "c9b66bd";
|
||||
pub fn aster_crate_dep(crate_name: &str) -> String {
|
||||
format!(
|
||||
"{} = {{ git = \"{}\", rev = \"{}\" }}",
|
||||
|
Reference in New Issue
Block a user