From 0b41f8129c0d90ef03514e0628c4e6534d92681a Mon Sep 17 00:00:00 2001 From: CTCaer Date: Thu, 29 Jan 2026 09:02:56 +0200 Subject: [PATCH] modules: set page size to 256 bytes Since this runs on BPMP a meaningful alignment is 32 bytes, so use a nicer 256. Reduces size of libs of up to 64KB. If libs are compiled for armv7/8, 4KB should be used if missing from compiler. --- modules/hekate_libsys_lp0/Makefile | 2 +- modules/hekate_libsys_minerva/Makefile | 2 +- modules/simple_sample/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/hekate_libsys_lp0/Makefile b/modules/hekate_libsys_lp0/Makefile index 40111e53..68a0746b 100644 --- a/modules/hekate_libsys_lp0/Makefile +++ b/modules/hekate_libsys_lp0/Makefile @@ -20,7 +20,7 @@ OBJS = $(addprefix $(BUILDDIR)/,\ ARCH := -march=armv4t -mtune=arm7tdmi -mthumb-interwork CFLAGS = $(ARCH) -O2 -nostdlib -fpie -ffunction-sections -fdata-sections -fomit-frame-pointer -std=gnu11 -Wall -Wsign-compare $(CUSTOMDEFINES) -LDFLAGS = $(ARCH) -fpie -pie -nostartfiles -lgcc +LDFLAGS = $(ARCH) -fpie -pie -nostartfiles -lgcc -Wl,-z,max-page-size=256 .PHONY: all diff --git a/modules/hekate_libsys_minerva/Makefile b/modules/hekate_libsys_minerva/Makefile index 4c5de590..e50bc364 100644 --- a/modules/hekate_libsys_minerva/Makefile +++ b/modules/hekate_libsys_minerva/Makefile @@ -20,7 +20,7 @@ OBJS = $(addprefix $(BUILDDIR)/,\ ARCH := -march=armv4t -mtune=arm7tdmi -mthumb-interwork CFLAGS = $(ARCH) -O2 -nostdlib -fpie -ffunction-sections -fdata-sections -fomit-frame-pointer -std=gnu11 -Wall -Wsign-compare $(CUSTOMDEFINES) -LDFLAGS = $(ARCH) -fpie -pie -nostartfiles -lgcc +LDFLAGS = $(ARCH) -fpie -pie -nostartfiles -lgcc -Wl,-z,max-page-size=256 .PHONY: all diff --git a/modules/simple_sample/Makefile b/modules/simple_sample/Makefile index 2e090dba..75ea4698 100644 --- a/modules/simple_sample/Makefile +++ b/modules/simple_sample/Makefile @@ -27,7 +27,7 @@ CUSTOMDEFINES := -DGFX_INC=$(GFX_INC) ARCH := -march=armv4t -mtune=arm7tdmi -mthumb-interwork CFLAGS = $(ARCH) -O2 -nostdlib -fpie -ffunction-sections -fdata-sections -fomit-frame-pointer -std=gnu11 -Wall -Wsign-compare $(CUSTOMDEFINES) -LDFLAGS = $(ARCH) -fpie -pie -nostartfiles -lgcc +LDFLAGS = $(ARCH) -fpie -pie -nostartfiles -lgcc -Wl,-z,max-page-size=256 .PHONY: clean all