On Wed, Jun 07, 2000 at 09:46:26AM -0500, Dan Nelson wrote:
> It's hard because SCO doesn't
> document any of this. You have to root through headers trying to
> figure out what structures are used when.
How do you think the rest of the emulator has been written? :-)
Ok -- I envisaged that there'd be a difficulty with different SysV vendors
who used different semantics for the same syscalls, or different syscall
numbering schemes. "It could happen!" (and, as we can see, it probably
has).
To fix it in as painless a way as possible, I'm envisaging something
along the lines of this:
* The existing svr4 KLD module, which implements the guts of the
emulator; and
* Additional much, much smaller modules which implement the differences
between the "base" svr4 and wierd oddball variants.
The additional modules would be dependent on the base module. Each one
would have its own syscall table, but most of the entries in it would
point to symbols which are defined in the base module. Only the system
calls which have totally different semantics would need to be defined
separately.
Of course, this also gives us a simple way to renumber syscalls.
Each variant would have its own ELF brand to aid the selection of the
correct API.
The files used to implement this would be in subdirectories of
src/sys/svr4 and src/sys/i386/svr4, each of which would contain a
*_sysvec.c file, a syscalls.master file, and the support .h files
needed to glue it all together. The result of running "make"
in src/modules/svr4 would be a base KLD plus several smaller flavour-
specific KLDs.
Note that syscall numbering isn't the only thing I can see that'll
be different between "flavours" of SysVR4. Things like ioctl() commands,
signal numbers, and basically all the other things the emulator translates
could exhibit minor differences between flavours, but the bulk of it should
be the same from vendor to vendor.
Comments?
- mark
--
Mark Newton Email: [EMAIL PROTECTED] (W)
Network Engineer Email: [EMAIL PROTECTED] (H)
Internode Systems Pty Ltd Desk: +61-8-82232999
"Network Man" - Anagram of "Mark Newton" Mobile: +61-416-202-223
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message