How is Win/Dos syscalls implemented in Wine?
ovehk at ping.uio.no
Sat Oct 26 11:03:20 CDT 2002
On Sat, 26 Oct 2002, Uwe Bonnes wrote:
> >>>>> "Ove" == Ove Kaaven <ovehk at ping.uio.no> writes:
> Ove> On Sat, 26 Oct 2002, Sylvain Petreolle wrote:
> >> Why couldnt we implement a int 0x80 that would do nothing/call
> >> SIGSEGV handler ? We did it for all other ints we have implemented.
> Ove> That's not the way it works. Interrupt goes to OS core (global IDT
> Ove> table actually), is rejected (privilege level check fails), SIGSEGV
> Ove> is raised, Wine detects SIGSEGV and its cause, Wine handles
> Ove> interrupt. You can't change the order in which this happens from
> Ove> user-space. Only a kernel module can replace IDT entries (and if
> Ove> you did, replacing the 0x80 entry would kill *all* running Linux
> Ove> apps, since the IDT is global).
> What happens on a win/win32 system when a program has lets say a sequence
> like "set up values for thread abort for linux, call int80()" in its
> startup code?
I'm not sure, but I'd expect an exception to be raised. (Gav once
investigated what an int80 does under Windows, as part of development
related to WineX's secret copy protection code, and I think he said that
it would crash on his system)
More information about the wine-devel