Page MenuHomeFreeBSD

boot1.chrp: Specify --image-base
ClosedPublic

Authored by ivy on Fri, Apr 17, 3:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 19, 4:44 PM
Unknown Object (File)
Sat, Apr 18, 7:50 AM
Unknown Object (File)
Sat, Apr 18, 7:50 AM
Unknown Object (File)
Sat, Apr 18, 6:13 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy requested review of this revision.Fri, Apr 17, 3:49 AM
This revision was not accepted when it landed; it landed in state Needs Review.Sat, Apr 18, 8:16 PM
This revision was automatically updated to reflect the committed changes.