From c4b39a534f95f0400b25cbf211f29e06f72d8229 Mon Sep 17 00:00:00 2001 From: Alan Jian Date: Tue, 25 Jun 2024 09:44:30 +0800 Subject: [PATCH] Fix RWX section linking error --- include/dev.h | 2 +- kernel.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dev.h b/include/dev.h index c1ff65a..53306be 100644 --- a/include/dev.h +++ b/include/dev.h @@ -35,4 +35,4 @@ typedef struct { #define dev_init(compat, func) \ section(.init.dev) \ - used static dev_init_t _DEV_INIT = {_MODULE_NAME, compat, func} + used static const dev_init_t _DEV_INIT = {_MODULE_NAME, compat, func} diff --git a/kernel.ld b/kernel.ld index 8f35d16..f538164 100644 --- a/kernel.ld +++ b/kernel.ld @@ -8,7 +8,7 @@ SECTIONS { *(.init) } - . = ALIGN(4K); + . = ALIGN(8); PROVIDE(_pre_init_start = .); .init.pre_init : { *(.init.pre_init)