git: aa0bc7cca153 - main - boot1.chrp: Specify --image-base
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 18 Apr 2026 20:16:25 UTC
The branch main has been updated by ivy:
URL: https://cgit.FreeBSD.org/src/commit/?id=aa0bc7cca153f67f8becec8a8fb259ff5fd30fd0
commit aa0bc7cca153f67f8becec8a8fb259ff5fd30fd0
Author: Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2026-04-18 20:07:40 +0000
Commit: Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2026-04-18 20:15:26 +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
---
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 e67414584bc8..a693f775dde8 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}