comparison src/unexnt.c @ 304:c6de09ad3017 r21-0b50

Import from CVS: tag r21-0b50
author cvs
date Mon, 13 Aug 2007 10:41:12 +0200
parents 70ad99077275
children aabb7f5b1c81
comparison
equal deleted inserted replaced
303:d02ffe1d75ed 304:c6de09ad3017
95 PUCHAR data_start_va = UNINIT_PTR; 95 PUCHAR data_start_va = UNINIT_PTR;
96 DWORD data_start_file = UNINIT_LONG; 96 DWORD data_start_file = UNINIT_LONG;
97 DWORD data_size = UNINIT_LONG; 97 DWORD data_size = UNINIT_LONG;
98 98
99 /* Cached info about the .bss section in the executable. */ 99 /* Cached info about the .bss section in the executable. */
100 #ifndef DUMP_SEPARATE_SECTION 100 PUCHAR bss_start = UNINIT_PTR;
101 PUCHAR bss_start = 0; 101 DWORD bss_size = UNINIT_LONG;
102 DWORD bss_size = 0;
103 #endif
104 102
105 #ifdef HAVE_NTGUI 103 #ifdef HAVE_NTGUI
106 HINSTANCE hinst = NULL; 104 HINSTANCE hinst = NULL;
107 HINSTANCE hprevinst = NULL; 105 HINSTANCE hprevinst = NULL;
108 LPSTR lpCmdLine = ""; 106 LPSTR lpCmdLine = "";
477 } 475 }
478 section++; 476 section++;
479 } 477 }
480 478
481 #ifndef DUMP_SEPARATE_SECTION 479 #ifndef DUMP_SEPARATE_SECTION
482 if (!bss_start) 480 if (bss_start == UNINIT_PTR)
483 { 481 {
484 /* Starting with MSVC 4.0, the .bss section has been eliminated 482 /* Starting with MSVC 4.0, the .bss section has been eliminated
485 and appended virtually to the end of the .data section. Our 483 and appended virtually to the end of the .data section. Our
486 only hint about where the .bss section starts in the address 484 only hint about where the .bss section starts in the address
487 comes from the SizeOfRawData field in the .data section 485 comes from the SizeOfRawData field in the .data section
494 get_bss_info_from_map_file (p_infile, &ptr, &bss_size); 492 get_bss_info_from_map_file (p_infile, &ptr, &bss_size);
495 bss_start = ptr + nt_header->OptionalHeader.ImageBase 493 bss_start = ptr + nt_header->OptionalHeader.ImageBase
496 + data_section->VirtualAddress; 494 + data_section->VirtualAddress;
497 bss_size = (char*)&my_ebss - (char*)bss_start; 495 bss_size = (char*)&my_ebss - (char*)bss_start;
498 } 496 }
497 #else
498 bss_size = 0;
499 #endif 499 #endif
500 } 500 }
501 501
502 502
503 /* The dump routines. */ 503 /* The dump routines. */