diff --git a/include/nuttx/addrenv.h b/include/nuttx/addrenv.h index 4748bef90bc..2d366df3d79 100644 --- a/include/nuttx/addrenv.h +++ b/include/nuttx/addrenv.h @@ -113,7 +113,9 @@ */ #ifdef CONFIG_BUILD_KERNEL -# define ARCH_DATA_RESERVE_SIZE 512 +/* use MM_PGSIZE to unify among all archs for now */ + +# define ARCH_DATA_RESERVE_SIZE CONFIG_MM_PGSIZE #else # define ARCH_DATA_RESERVE_SIZE 0 #endif diff --git a/libs/libc/modlib/gnu-elf.ld.in b/libs/libc/modlib/gnu-elf.ld.in index 590cb5aefda..695fd8bc440 100644 --- a/libs/libc/modlib/gnu-elf.ld.in +++ b/libs/libc/modlib/gnu-elf.ld.in @@ -26,7 +26,8 @@ # include # define TEXT CONFIG_ARCH_TEXT_VBASE -# define DATA CONFIG_ARCH_DATA_VBASE + CONFIG_MM_PGSIZE +# define DATA CONFIG_ARCH_DATA_VBASE + ARCH_DATA_RESERVE_SIZE + #else # define TEXT 0x0 # define DATA