HomeFreeBSD

boot1.chrp: Specify --image-base

Description

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)
(cherry picked from commit ee58056e1e42de9230a159412827da97ae7f03bc)

Details

Provenance
ivyAuthored on Apr 18 2026, 8:07 PM
dimCommitted on May 29 2026, 10:56 PM
Differential Revision
D56459: boot1.chrp: Specify --image-base
Parents
rG8e1a9532ce19: boot1.chrp: Improve comment for the SLOF hack
Branches
Unknown
Tags
Unknown