> VSTa is designed assuming that the a.out format can be executed after simply
> memory mapping its pages. It sounds like your format uses text relocated
> for 0x1000 but offset 0x20 bytes in the file image. A simple but shameless
> way to deal with this is to hack your DOS server so that files which start
> with the magic a.out number are fiddled within dos_read() so that the file
> layout appears to be page aligned.
Dont want to hack each possible file server. I was thinking that if
it was decided that a certain non-aligned format was definitely needed,
an extra layer (stackable filesystem) could be added which does this
translation. Only the exec*() routines need know about this system.
> Less desirable is to teach the VSTa VM system how to do unaligned I/O for
> mapped files. You'll have to think hard concerning the page cache part.
I was thinking it might be possible for the VM system to add a byte
offset to all requests it sends to a filesystem server (just like it
adds a page-offset when requesting pages right now).
> The best strategy is probably to use the appropriate ld flags and generate
> something with page aligned file organization.
Yes. This is what I think too. You mentioned earlier that the linker
being used is special (to match the linker that was originally used
from dos when the system was being brought up). That the a.out header
was part of the text segment. I've been trying to think of how
this could be done with just ld flags but I cant think of a way to
do it. Maybe I should get a copy of the vsta linker. What exactly
are the differences between this loader and the normal (bsd)
loader?
Alternatively I could just use the ZMAGIC format my loader supports
which seems to put the a.out header at virtual address 0 and the
first text page at virtual address one with the file image being
identical to the memory image (at least for the first segment). Then
exec*() would just set the page offset to 1 and starting address
as 0x1000.
The drawback of the second approach is that most of a page
(0x1000 - 0x20) bytes are wasted. This hits worst for the
boot servers since thats an extra page, in memory, locked down,
that is being used.
> Andy
Received on Mon Nov 28 17:14:17 1994
This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:10 PDT