Subject: Re: "page alignment" of kernels in the Booter
To: None <nigel@ind.tansu.com.au>
From: Matt Thomas <matt@3am-software.com>
List: port-mac68k
Date: 03/11/2001 17:44:58
At 12:08 PM 3/12/2001 +1100, nigel@ind.tansu.com.au wrote:
> > > I am trying to hack ELF support in. The libsa/loadfile code
> > >only seems to align some sections to longword boundaries. So, can I
> > >assume that an ELF kernel will always have the correct alignments
> > >compiled/linked in?
> >
> > You should always trust what the ELF header tells you.
>
>
> OK. The only other problem is - what is the page size?
>(I need it for alignment of the start of the kernel)
That's is in the ELF Phdr as well. Use it. p_align is what
you are looking for. (1 << phdr->p_align).
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message