Subject: Re: Shared arm26/arm32 user code
To: Matt Thomas <matt@3am-software.com>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm26
Date: 11/25/2000 11:58:54
On Fri, 24 Nov 2000, Matt Thomas wrote:
> At 08:57 PM 11/24/2000 +0000, Ben Harris wrote:
> >Probably the most common question I get asked about NetBSD/arm26 is "can
> >it run arm32 programs?". So far, my answer has been "no". I'd like to
> >change this. This will require some co-operation from the arm32 side, but
> >if it could be achieved at the same time as the ELF transition (and before
> >arm26 gets shared libraries), I think it would be fairly painless.
>
> Heh. There may be application on arm32 that may need more than 32MB
> of address space (mozilla, ld making mozilla :), so will there be a way
> to have 32bit code call shared 26/32 code? (aka libc)?
There should be no problem with that. Shared code will be almost exactly
the same as 32-bit code. The main differences are that it'll only use
instructions in ARMv2 instruction set (which I don't think is
significantly different from ARMv3 for the compiler's purposes) and that
it'll check which mode it's in when extracting a return address from a
stack frame.
Obviously, shared code that needs more than 32Mb of address space won't
run on arm26 (the loader will return ENOEXEC if any of the segments
overrun 32Mb and malloc/mmap will return ENOMEM if it tries to dynamically
get more than 32Mb), but that's no worse than with pure 26-bit
code. Shared code that uses >32Mb should work fine on arm32 (modulo
problems with the range of branch instructions)..
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>