Changeset 2066 for trunk/src/kernel32/winimagepeldr.cpp
- Timestamp:
- Dec 13, 1999, 8:28:15 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winimagepeldr.cpp
r2061 r2066 1 /* $Id: winimagepeldr.cpp,v 1.2 2 1999-12-12 14:32:38sandervl Exp $ */1 /* $Id: winimagepeldr.cpp,v 1.23 1999-12-13 19:28:15 sandervl Exp $ */ 2 2 3 3 /* … … 49 49 #include "mmap.h" 50 50 #include <wprocess.h> 51 52 //Define COMMIT_ALL to let the pe loader commit all sections of the image 53 //This is very useful during debugging as you'll get lots of exceptions 54 //otherwise. 55 #define COMMIT_ALL 51 56 52 57 char szErrorTitle[] = "Odin"; … … 478 483 commitPage((ULONG)pFixups, FALSE); 479 484 } 480 // if(fh.Characteristics & IMAGE_FILE_DLL) { 481 if(processExports((char *)win32file) == FALSE) { 482 dprintf((LOG, "Failed to process exported apis" )); 483 goto failure; 484 } 485 // } 486 } 487 488 for (i=0; i<nSections; i++) { 485 #ifdef COMMIT_ALL 486 for (i=0; i<nSections; i++) { 489 487 commitPage((ULONG)section[i].realvirtaddr, FALSE, COMPLETE_SECTION); 490 } 488 } 489 #else 490 for (i=0; i<nSections; i++) { 491 switch(section[i].type) 492 { 493 case SECTION_IMPORT: 494 case SECTION_RELOC: 495 case SECTION_EXPORT: 496 commitPage((ULONG)section[i].realvirtaddr, FALSE, COMPLETE_SECTION); 497 break; 498 } 499 } 500 #endif 501 if(processExports((char *)win32file) == FALSE) { 502 dprintf((LOG, "Failed to process exported apis" )); 503 goto failure; 504 } 505 } 506 #ifdef COMMIT_ALL 507 else { 508 for (i=0; i<nSections; i++) { 509 commitPage((ULONG)section[i].realvirtaddr, FALSE, COMPLETE_SECTION); 510 } 511 } 512 #endif 491 513 492 514 //SvL: Use pointer to image header as module handle now. Some apps needs this … … 895 917 } 896 918 //SvL: Read page from disk 897 commitPage(newpage, TRUE, SINGLE_PAGE);919 commitPage(newpage, FALSE, SINGLE_PAGE); 898 920 899 921 //SvL: Enable write access … … 1414 1436 j++; 1415 1437 if((ulCurFixup & 0xfff) == 0) { 1416 commitPage(ulCurFixup & ~0xfff, TRUE, SINGLE_PAGE);1438 commitPage(ulCurFixup & ~0xfff, FALSE, SINGLE_PAGE); 1417 1439 DosSetMem((PVOID)(ulCurFixup & ~0xfff), PAGE_SIZE, PAG_READ|PAG_WRITE); 1418 1440 nrPages++;
Note:
See TracChangeset
for help on using the changeset viewer.