Skip to content

Commit

Permalink
More fixup fixes. We're now into EMX crt0.s, calling missing doscalls…
Browse files Browse the repository at this point in the history
… APIs.
  • Loading branch information
icculus committed Sep 26, 2016
1 parent 4c09b9b commit 141ff8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lx_loader.c
Expand Up @@ -795,32 +795,32 @@ static LxModule *loadLxModule(uint8 *exe, uint32 exelen, int dependency_tree_dep
while (*entryptr) { /* end field has a value of zero. */
const uint8 numentries = *(entryptr++); /* number of entries in this bundle */
const uint8 bundletype = *(entryptr++) & ~0x80;
obj = ((const LxObjectTableEntry *) (exe + lx->object_table_offset));
uint16 objidx = 0;

switch (bundletype) {
case 0x00: // UNUSED
ordinal += numentries;
break;

case 0x01: // 16BIT
obj += *((const uint16 *) entryptr);
objidx = *((const uint16 *) entryptr) - 1;
entryptr += 2;
for (uint8 i = 0; i < numentries; i++) {
entryptr++;
expord->ordinal = ordinal++;
expord->addr = obj->reloc_base_addr + *((const uint16 *) entryptr);
expord->addr = ((uint8 *) retval->mmaps[objidx].addr) + *((const uint16 *) entryptr);
expord++;
entryptr += 2;
} // for
break;

case 0x03: // 32BIT
obj += *((const uint16 *) entryptr);
objidx = *((const uint16 *) entryptr) - 1;
entryptr += 2;
for (uint8 i = 0; i < numentries; i++) {
entryptr++;
expord->ordinal = ordinal++;
expord->addr = obj->reloc_base_addr + *((const uint32 *) entryptr);
expord->addr = ((uint8 *) retval->mmaps[objidx].addr) + *((const uint32 *) entryptr);
expord++;
entryptr += 4;
}
Expand Down

0 comments on commit 141ff8b

Please sign in to comment.