Date: Tue, 12 Jun 2018 11:11:25 -0600 From: Warner Losh <imp@bsdimp.com> To: Mark Johnston <markj@freebsd.org> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: specifying alignment of loader files Message-ID: <CANCZdfofkgg4NyGtVucn7O6r44q7JBqf1fHf0qqMbPT-sTui6A@mail.gmail.com> In-Reply-To: <20180612170420.GD56138@raichu> References: <20180612170420.GD56138@raichu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 12, 2018 at 11:04 AM, Mark Johnston <markj@freebsd.org> wrote: > Hi, > > I'm writing some code which processes a file loaded by the loader. I > want the file's contents to be available at a certain alignment in > memory, and as far as I can see, the loader provides no alignment > guarantees today. The access will happen early enough during boot that > making an aligned copy of the data will be awkward, so I'd like the > loader to provide the desired alignment. > > I'm considering adding a new "module_align" variable that would specify > the alignment for a given file type, and plumb that through to > command_load(). Does anyone have an alternate suggestion, or an > objection to my proposal? > I thought the loader already did that for ELF sections... Why not wrap your file in such a segment? Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfofkgg4NyGtVucn7O6r44q7JBqf1fHf0qqMbPT-sTui6A>