Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows emulation

6 views
Skip to first unread message

John_...@gec-epl.co.uk

unread,
Jun 3, 1993, 7:50:29 AM6/3/93
to
Newsgroups: comp.os.linux
Path: SDD!cuthbert!newsfeed
From: er...@tantalus.nrl.navy.mil (Eric Youngdale)
Subject: Re: dosemu and windows
Message-ID: <1993Jun2.185352.2254@cuthbert>
Sender: newsfeed@cuthbert (News_Feed)
Organization: SDD
Date: Wed, 2 Jun 1993 16:04:49 GMT

In article <100...@hydra.gatech.EDU> gt8...@prism.gatech.EDU (Howlin' Bob) writes:
>In <C7yoy...@ra.nrl.navy.mil> er...@tantalus.nrl.navy.mil (Eric Youngdale) writes:
> For example, to get WABI under linux, we need to establish a framework
>for solving the problem, and I would suggest the following steps.
>

> 2) Write a program loader for a Windows binary. Here you make use of
>the info obtained before, and actually mmap the file in question. You also
>need to be able to set things up for the dynamic linking. It may be possible
>to let the dynamic linker resolve some things on the fly as with SVr4, or you
>can simply walk through the tables and substitute the correct values. For
>this, you can make use of some of the code that I have generated for the SVR4
>ELF program loader. Initialy you could just substitute the address of exit()
>for all of the functions if you wanted, or you could add a printf statement,
>or whatever you wanted to do.>

This would need quite extensive changes to the kernel wouldn't it? Windows
makes extensive use of selectors in the LDT, and as far as I know there
is no way of allocating selector in the LDT by an application program.


Howlin' Bob

unread,
Jun 3, 1993, 10:01:00 AM6/3/93
to
In <9306031150.AA11396@jupiter.sdd> John_...@gec-epl.co.UK writes:

>This would need quite extensive changes to the kernel wouldn't it? Windows
>makes extensive use of selectors in the LDT, and as far as I know there
>is no way of allocating selector in the LDT by an application program.

As of 0.99pl10, the kernel does not use the LDT. Writing system
calls to allocate and deallocate local segment descriptors is fairly
simple. If and when I implement DPMI for dosemu, I will do this anyway.

--
Robert Sanders
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt8134b
Internet: gt8...@prism.gatech.edu

ed.d...@lambada.oit.unc.edu

unread,
Jun 3, 1993, 10:35:33 AM6/3/93
to
PLEASE take this discussion to the dosemu mailing list. PLEASE!!!
Between this and the split discussion (which should be in news.groups,
not here), it's getting ridiculous.

Chao,

-Ed.

Eric Youngdale

unread,
Jun 3, 1993, 12:34:48 PM6/3/93
to
In article <9306031150.AA11396@jupiter.sdd> John_...@gec-epl.co.UK writes:
>Newsgroups: comp.os.linux

>> 2) Write a program loader for a Windows binary. Here you make use of
>>the info obtained before, and actually mmap the file in question. You also
>>need to be able to set things up for the dynamic linking. It may be possible
>>to let the dynamic linker resolve some things on the fly as with SVr4, or you
>>can simply walk through the tables and substitute the correct values. For
>>this, you can make use of some of the code that I have generated for the SVR4
>>ELF program loader. Initialy you could just substitute the address of exit()
>>for all of the functions if you wanted, or you could add a printf statement,
>>or whatever you wanted to do.>
>
>This would need quite extensive changes to the kernel wouldn't it? Windows
>makes extensive use of selectors in the LDT, and as far as I know there
>is no way of allocating selector in the LDT by an application program.

It would not have to be that bad. In 0.99pl10, Linus added something
that would allow an lcall 7,0 instruction to do the right thing, and I am
now fleshing this out with iBCS/ABI stuff. I think that this could be
generalized a little bit to allow applications to set up the call gates, and
this could be done in such a way that the call gate calls some address in user
space instead of kernel space so that the kernel would not really need very
much work at all.

-Eric


--
"When Gregor Samsa woke up one morning from unsettling dreams, he
found himself changed in his bed into a lawyer."

0 new messages