diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2026-04-18 20:07:40 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2026-04-18 20:15:26 +0000 |
| commit | aa0bc7cca153f67f8becec8a8fb259ff5fd30fd0 (patch) | |
| tree | b3fdb264cb20f63873a40ae14b0ef32d1789517a | |
| parent | cca22c36c306dfabe13b1d1de10e8d27ef3c3bce (diff) | |
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
| -rw-r--r-- | stand/powerpc/boot1.chrp/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
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} |
