Skip to content

Commit

Permalink
modlib/gnu-elf.ld.in: fix regression with armv7a
Browse files Browse the repository at this point in the history
As armv7-a addrenv layout is not in line with other archs, we need
align it with others by defining ARCH_DATA_RESERVE_SIZE as same as
MM_PGSIZE for now to keep gnu-elf.ld.in unified.

Signed-off-by: Yanfeng Liu <[email protected]>
  • Loading branch information
yf13 authored and xiaoxiang781216 committed Jan 17, 2025
1 parent d4a0abe commit 1b36954
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/nuttx/addrenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion libs/libc/modlib/gnu-elf.ld.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
# include <nuttx/addrenv.h>

# 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
Expand Down

0 comments on commit 1b36954

Please sign in to comment.