git: 91d8ee3579ef - main - i386/loader: force 4k linker max page size
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Mar 2025 20:22:39 UTC
The branch main has been updated by chs:
URL: https://cgit.FreeBSD.org/src/commit/?id=91d8ee3579ef3589b836922b14b79cc10fb99bbc
commit 91d8ee3579ef3589b836922b14b79cc10fb99bbc
Author: Chuck Silvers <chs@FreeBSD.org>
AuthorDate: 2025-03-19 19:52:50 +0000
Commit: Chuck Silvers <chs@FreeBSD.org>
CommitDate: 2025-03-19 19:56:34 +0000
i386/loader: force 4k linker max page size
Force the BIOS loaders to use the standard 4k linker max page size
so that they fit in the limited space even if someone has set
a larger default linker max page size via /etc/src.conf.
Reviewed by: imp
Sponsored by: Netflix
---
stand/i386/loader/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile
index 857944dcd010..bb9111c3dcce 100644
--- a/stand/i386/loader/Makefile
+++ b/stand/i386/loader/Makefile
@@ -140,6 +140,10 @@ FILESMODE_${LOADER}= ${BINMODE} -b
# files.
LDFLAGS+= ${BTXCRT}
+# Force the linker max page size to 4k so that we fit in the limited space even
+# if someone has set a larger default linker max page size via /etc/src.conf.
+LDFLAGS+= -Wl,-z,max-page-size=0x1000
+
DPADD= ${LDR_INTERP32} ${LIBI386} ${LIBSA32}
LDADD= ${LDR_INTERP32} ${LIBI386} ${LIBSA32}