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 17:48:51 +0200

Download raw body.

Thread
> From: "Theo de Raadt" <deraadt@openbsd.org>
> Date: Tue, 18 Aug 2026 08:46:45 -0600
> 
> Kirill A. Korinsky <kirill@korins.ky> wrote:
> 
> > On Tue, 18 Aug 2026 15:23:25 +0200,
> > Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > > 
> > > > Date: Tue, 18 Aug 2026 15:18:01 +0200
> > > > From: "Kirill A. Korinsky" <kirill@korins.ky>
> > > > 
> > > > Robert, Sebastien,
> > > > 
> > > > BFD aligns nonpaged PT_LOAD segments to their maximum contained section
> > > > alignment. Do the same for SPARCV9 instead of retaining the 1 MiB maximum
> > > > page alignment.
> > > > 
> > > > This removes roughly 1 MiB of leading padding from ofwboot without changing
> > > > its load address or memory layout.
> > > > 
> > > > Here diff for the base and llvm/22 in ports.
> > > > 
> > > > Ok?
> > > 
> > > This is questionable.  What problem are you trying to solve?
> > >
> > 
> > Size for floppy, ramdiskB and so on.
> > 
> > Without it, ramdiskB won't fit.
> 
> 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.