diff --git a/src/arch/riscv/linker.ld b/src/arch/riscv/linker.ld index df65637..be1c14e 100644 --- a/src/arch/riscv/linker.ld +++ b/src/arch/riscv/linker.ld @@ -2,6 +2,7 @@ OUTPUT_ARCH(riscv) ENTRY(_start) BASE_ADDRESS = 0x80200000; +PAGE_SIZE = 0x1000; MEMORY { DRAM : ORIGIN = BASE_ADDRESS, LENGTH = 16M @@ -15,13 +16,13 @@ SECTIONS { *(.text.entry) *(.text .text.*) - . = ALIGN(0x1000); + . = ALIGN(PAGE_SIZE); __trampoline_start = .; *(.trampoline_section) - . = ALIGN(0x1000); + . = ALIGN(PAGE_SIZE); __trampoline_end = .; - ASSERT(__trampoline_end - __trampoline_start == 0x1000, "trampoline larger than one page"); + ASSERT(__trampoline_end - __trampoline_start == PAGE_SIZE, "trampoline does not fit into one page"); __text_end = .; } > DRAM @@ -56,6 +57,7 @@ SECTIONS { /DISCARD/ : { *(.eh_frame) } - + + . = ALIGN(PAGE_SIZE); __kernel_end = .; }