HLA Linux syscalls and related stuff
From: T.M. Sommers (tms2_at_mail.ptd.net)
Date: 10/17/03
- Next message: Betov: "Re: Betov, Betov, wherefore art thou Betov."
- Previous message: The Mosquito ScriptKiddiot: "Re: DisAssembler... Where to start..."
- Next in thread: Randall Hyde: "Re: HLA Linux syscalls and related stuff"
- Reply: Randall Hyde: "Re: HLA Linux syscalls and related stuff"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 17 Oct 2003 07:09:57 GMT
I'm not 100% certain about how Linux handles the return codes from
syscalls, and what the HLA syscall wrappers do with those codes.
It looks like the syscalls' return value is in %eax, and that in the
case of an error, the return value is the negative of the C error
code, and that the HLA wrappers leave this value alone. Is that correct?
I thought I had seen a global errno variable, as in C, but now I don't
find it. Is it correct that there is none?
Outside of the linux directory, I found about 90 instances that test
for os.linux in the library. For a FreeBSD version, I can see two
ways to deal with them:
1) Duplicate the code; or
2) Try to unify the Linux and FreeBSD code somehow (I'm thinking of
something analogous to the method FreeBSD uses to implement its Linux
compatibility mode. The kernel's structure for each proc has a
pointer to a table of pointers to the kernel functions that implement
the syscalls. Native procs point to a FreeBSD table, Linux procs
point to a Linux table.)
The latter would be more work initially, but should make porting to
other Unices easier. However, I'm not sure that it could be done
without some runtime penalties, especially for calling the syscall
functions. Do you think it would be worthwhile to try this approach?
A final question: do HLA procedures pass their arguments on the stack?
- Next message: Betov: "Re: Betov, Betov, wherefore art thou Betov."
- Previous message: The Mosquito ScriptKiddiot: "Re: DisAssembler... Where to start..."
- Next in thread: Randall Hyde: "Re: HLA Linux syscalls and related stuff"
- Reply: Randall Hyde: "Re: HLA Linux syscalls and related stuff"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|