Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: llvm/sparc64: match BFD -N alignment
To:
"Theo de Raadt" <deraadt@openbsd.org>
Cc:
semarie@online.fr, robert@openbsd.org, tech@openbsd.org
Date:
Tue, 18 Aug 2026 19:56:28 +0200

Download raw body.

Thread
> From: "Theo de Raadt" <deraadt@openbsd.org>
> Date: Tue, 18 Aug 2026 10:33:35 -0600
> 
> Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> 
> > > OK deraadt, but now that it's serious kettenis may have other nits.
> > > The conditions look correct to me and I don't think anything outside
> > > sys/arch/sparc64/stand uses the ld options which use this so the effects
> > > are tightly constrained.
> > 
> > I have a feeling that this is trying to work around an issue that can
> > be fixed by passing the right command line arguments and/or a fairly
> > simple linker script.  Please let me see if I can figure that out
> > before committing this.
> 
> In the old days, did nmagic binaries really do 1MB padding?
> I doubt it.  So it seems like an oversight.

The padding seems to be a consequence of mixing -N with -Ttext.

Kirill, can you try replacing

  "-Ttext ${RELOC}"

with

  "--image-base=0x${RELOC}"

?

And maybe you can put your current ofwboot binary (the one produces by
your midified version of ld.lld) somewhere such that I can take a look
at it?