Changeset 176 for trunk/src/helpers/exeh.c
- Timestamp:
- Jun 17, 2002, 9:55:18 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/exeh.c
r169 r176 2 2 /* 3 3 *@@sourcefile exeh.c: 4 * contains code to load and parse executable files, 5 * including resources. 6 * See exehOpen for details. 4 * contains code to load and parse executable headers 5 * and resources. See exehOpen for details. 7 6 * 8 7 * This file is new with V0.9.16 (2002-01-05) [umoeller] … … 89 88 * executable headers manually. Since DosLoadModule 90 89 * et al is never used, the OS/2 executable loader 91 * is completely circumvented. 90 * is completely circumvented. (Side note: 91 * DosLoadModule cannot be used on EXE files in 92 * the first place.) 92 93 * 93 94 * To be more precise, this uses doshOpen internally … … 149 150 * V0.9.12 adds support for NOSTUB executables, 150 151 * which are new-style executables (NE or LX) 151 * without a leading DOS header. The executable 152 * then starts directly with the NE or LX header. 153 * I am not sure whether PE supports such things 154 * as well... if so, it should be supported too. 152 * without a leading DOS header. JFS.IFS uses that 153 * format, for example. The executable then starts 154 * directly with the NE or LX header. I am not sure 155 * whether PE supports such beasts as well... if 156 * so, it should be supported too. 155 157 * 156 158 * Note that not all of the other exeh* functions … … 458 460 } 459 461 } 460 } 461 } 462 } 463 } 462 } // end else if (cbRead < sizeof(IMAGE_FILE_HEADER)) 463 } // end if (!(arc = doshReadAt(pFile, 464 } // end else if (!(pExec->pPEHeader = (PPEHEADER)malloc(sizeof(PEHEADER)))) 465 } // end else if (!memcmp(achNewHeaderType, "PE\0\0", 4)) 464 466 else 465 467 // strange type: … … 2277 2279 int cchSrcPage) // in: size of source buf 2278 2280 { 2279 char *pachDestPage = pachPage; /* Store the pointer for boundrary checking. */2281 char *pachDestPage = pachPage; /* Store the pointer for boundrary checking. */ 2280 2282 2281 2283 while (cchSrcPage > 0) … … 2560 2562 ULONG ulPageSize = pExec->pLXHeader->ulPageSize; 2561 2563 2562 ulOffset += 2564 ulOffset += ulExeOffset; 2563 2565 2564 2566 /* _Pmpf((" reading pgtbl %d, ofs %d, type %s", … … 3113 3115 * exehOpen. 3114 3116 * 3115 * This automaticall calls exehFreeLXMaps. 3117 * This automaticall calls exehFreeLXMaps and 3118 * exehFreeNEMaps. 3116 3119 * 3117 3120 *@@added V0.9.0 [umoeller]
Note:
See TracChangeset
for help on using the changeset viewer.