Calculate kernel size in pages dinamically

This commit is contained in:
2025-07-31 23:37:31 +02:00
parent d12bfbcd43
commit 3e50e74526
3 changed files with 136 additions and 34 deletions

View File

@@ -19,14 +19,14 @@ SECTIONS {
} :text
. = ALIGN(CONSTANT(MAXPAGESIZE));
PROVIDE(etext = . - _kernel_offset);
PROVIDE(etext = .);
.rodata : AT(ADDR(.rodata) - _kernel_offset) ALIGN(16) {
*(.rodata .rodata.*);
}
. = ALIGN(CONSTANT(MAXPAGESIZE));
PROVIDE(_data = . - _kernel_offset);
PROVIDE(_data = .);
.data : AT(ADDR(.data) - _kernel_offset) ALIGN(16) {
*(.data .data.*);
@@ -38,7 +38,7 @@ SECTIONS {
}
. = ALIGN(CONSTANT(MAXPAGESIZE));
PROVIDE(end = . - _kernel_offset);
PROVIDE(end = .);
/DISCARD/ : {
*(.eh_frame)