From dbacb9621530cdb5e2213d7a2a0281d7a4f9161f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 19 Sep 2016 23:02:21 -0400 Subject: [PATCH] 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. --- lx_loader.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lx_loader.c b/lx_loader.c index 8241cbb..d57968b 100644 --- a/lx_loader.c +++ b/lx_loader.c @@ -424,6 +424,10 @@ static __attribute__((noreturn)) void loadExe(const char *exefname, uint8 *exe, const LxObjectTableEntry *obj = ((const LxObjectTableEntry *) (exe + lx->object_table_offset)); for (uint32 i = 0; i < lx->module_num_objects; i++, obj++) { + + if (obj->object_flags & 0x8) // !!! FIXME: resource object; ignore this until resource support is written, later. + continue; + uint32 vsize = obj->virtual_size; if ((vsize % lx->page_size) != 0) vsize += lx->page_size - (vsize % lx->page_size);