Subject: Re: Shared arm26/arm32 user code
To: Richard Earnshaw <rearnsha@arm.com>
From: Charles M. Hannum <root@ihack.net>
List: port-arm26
Date: 11/25/2000 15:54:48
> > A final thing that needs to be considered is that arm26 requires sections
> > to be aligned on 32k boundaries, so the linker will have to be set up to
> > arrange this.
> 
> This will of course have a cost for arm32 people in that it will make 
> their binaries bigger.  There may also have to be some work done in the 
> kernel to force it to load such images on well-aligned pages, but I don't 
> think it will affect the mapping algorithms, arm32 kernels can still map 
> 4k pages at a time.
> 
> A trick that was done in the RISX iX world was to merge the last (partial) 
> text page with the first data page, mapping the entire page read-write; 
> this meant that for many small programs, the image could be kept to just 
> 32K.  I've no idea whether we can (or already do) play a similar trick on 
> NetBSD.

An ELF linker can (and, at least on other platforms, *does*) already
do this, provided it knows the page size is smaller than the
alignment.