:07:40 +0000 Commit: Lexi Winter CommitDate: 2026-05-04 00:14:38 +0000 boot1.chrp: Specify --image-base This is required for LLVM 22's ld.lld to avoid a build error: ld.lld: error: section '.text' address (0x38000) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.rodata' address (0x3b308) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.data' address (0x3b610) is smaller than image base (0x10000000); specify --image-base ld.lld: error: section '.bss' address (0x3f618) is smaller than image base (0x10000000); specify --image-base Use 0x38000 for the image base, which is the address of the lowest (and only) LOAD segment in the file. Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56459 (cherry picked from commit aa0bc7cca153f67f8becec8a8fb259ff5fd30fd0) --- stand/powerpc/boot1.chrp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/powerpc/boot1.chrp/Makefile b/stand/powerpc/boot1.chrp/Makefile index b91c0117b5a7..0b77bce2b097 100644 --- a/stand/powerpc/boot1.chrp/Makefile +++ b/stand/powerpc/boot1.chrp/Makefile @@ -21,7 +21,7 @@ CFLAGS+=-I${LDRSRC} # boot1.elf defined in the HFS template, but sometimes boot1.elf is written # directly to the PReP partition. # -LDFLAGS=-nostdlib -static -Wl,-N -Wl,-Ttext=0x38000 +LDFLAGS=-nostdlib -static -Wl,-N -Wl,-Ttext=0x38000 -Wl,--image-base=0x38000 .PATH: ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR}