Ryan C. Gordon
d9823705c0
Nop out the read of the FS register in EMX's syscall interface for now.
...
Eventually, we'll maybe need to set the FS register to be a proper TIB pointer,
but I'm mostly hoping that everything else was well-behaved enough to always
use DosGetInfoBlocks() instead. Yeah, right.
2016-10-02 18:21:51 -04:00
Ryan C. Gordon
f681be1b1f
Reworked the native module loading code.
2016-10-02 18:18:31 -04:00
Ryan C. Gordon
ebe5f95a3e
Put a real CMake project in here.
2016-09-30 18:08:36 -04:00
Ryan C. Gordon
bee2afe62b
Bunch More Work, mostly cleanup and organization.
...
Wanted to do this now before it gets out of hand.
Ideally, this can be used for a Winelib-like option eventually, too, where you
don't load OS/2 binaries at all but rather compile and link your OS/2-based
source code against this API reimplementation.
2016-09-30 15:58:48 -04:00
Ryan C. Gordon
6220544d06
Bunch More Work on getting an EMX-based "hello world" to run.
...
It looks like most of the remaining work for that is filling in dozens of
OS/2 APIs that EMX uses at startup just so we can get to our single
printf() call. :)
2016-09-30 10:36:33 -04:00
Ryan C. Gordon
08eaf1f59f
Fixed buffer overflow.
2016-09-27 10:07:47 -04:00
Ryan C. Gordon
3df4fc0544
Report caller address for missing functions.
2016-09-27 10:05:08 -04:00
Ryan C. Gordon
141ff8bdcd
More fixup fixes. We're now into EMX crt0.s, calling missing doscalls APIs.
2016-09-26 15:31:54 -04:00
Ryan C. Gordon
4c09b9b6f5
Call library init/termination code.
2016-09-26 12:14:45 -04:00
Ryan C. Gordon
d3e686276b
Fixups fixes.
2016-09-26 12:13:18 -04:00
Ryan C. Gordon
41e66c9071
Some more work on getting DLLs working.
2016-09-25 14:21:31 -04:00
Ryan C. Gordon
c3d9945942
Fixup source offsets are signed values (and sometimes negative!).
2016-09-25 14:20:20 -04:00
Ryan C. Gordon
17a64c9407
Don't load modules that are marked as non-loadable.
...
(Whatever that means in practice.)
2016-09-25 11:06:34 -04:00
Ryan C. Gordon
b82eabcdac
Try loading modules at random locations and see what happens.
2016-09-24 01:06:00 -04:00
Ryan C. Gordon
ce8215ff40
Realign the stack before calling _exit().
...
Just in case I ever get this working on macOS. :)
2016-09-24 01:05:33 -04:00
Ryan C. Gordon
acb3c5c42e
Get exported ordinals parsed, fixup correct pages.
2016-09-23 23:55:10 -04:00
Ryan C. Gordon
1a21e64a51
Fixed typo.
2016-09-23 23:54:36 -04:00
Ryan C. Gordon
dbda4e03d0
Corrected entry ordinals in lx_dump, a few other things.
2016-09-23 00:27:50 -04:00
Ryan C. Gordon
817af8d715
Load all the object pages into memory before fixing them up.
...
Otherwise, we might fixup a page that isn't loaded yet!
2016-09-22 10:46:42 -04:00
Ryan C. Gordon
443bcf2178
Huge reworking to get shared libraries (and native replacements) working.
...
Not there yet, but the framework is pretty close to what I want.
2016-09-21 03:38:20 -04:00
Ryan C. Gordon
1d8ad0ce35
Extremely initial work on dealing with external modules.
2016-09-20 00:48:56 -04:00
Ryan C. Gordon
45eebeaa3f
lx_dump: modules are indexed from 1, not zero.
2016-09-19 23:08:25 -04:00
Ryan C. Gordon
dbacb96215
Don't map resource objects.
...
For one, they generally have a base address of 0x0, but also, we're probably
going to load/parse these into a hashtable somewhere in the loader
and use that for resource lookups instead of parsing LX binaries during
DosGetResource(), and that is more of a malloc() thing than an mmap() thing.
2016-09-19 23:02:21 -04:00
Ryan C. Gordon
5aff2d5b02
Fixed mmap execute flags.
...
(I guess on i386, PROT_READ implies PROT_EXEC anyhow.)
2016-09-19 22:02:12 -04:00
Ryan C. Gordon
b9bc6d88d7
Added a simple README.
2016-09-19 19:56:04 -04:00
Ryan C. Gordon
161cde892e
Initial add. Runs exactly one program.
...
Run make.sh on a Linux box to see it run tests/hello.exe!
2016-09-19 19:41:11 -04:00