comparison src/unexnt.c @ 388:aabb7f5b1c81 r21-2-9

Import from CVS: tag r21-2-9
author cvs
date Mon, 13 Aug 2007 11:09:42 +0200
parents c6de09ad3017
children 74fd4e045ea6
comparison
equal deleted inserted replaced
387:f892a9d0bb8d 388:aabb7f5b1c81
547 } 547 }
548 548
549 static void 549 static void
550 dump_bss_and_heap (file_data *p_infile, file_data *p_outfile) 550 dump_bss_and_heap (file_data *p_infile, file_data *p_outfile)
551 { 551 {
552 unsigned char *heap_data, *bss_data; 552 unsigned char *heap_data;
553 unsigned long size, index; 553 unsigned long size, index;
554 554
555 DUMP_MSG (("Dumping heap onto end of executable...\n")); 555 DUMP_MSG (("Dumping heap onto end of executable...\n"));
556 556
557 index = heap_index_in_executable; 557 index = heap_index_in_executable;
563 DUMP_MSG (("\t0x%08x Heap size in bytes.\n", size)); 563 DUMP_MSG (("\t0x%08x Heap size in bytes.\n", size));
564 564
565 memcpy ((PUCHAR) p_outfile->file_base + index, heap_data, size); 565 memcpy ((PUCHAR) p_outfile->file_base + index, heap_data, size);
566 566
567 #ifndef DUMP_SEPARATE_SECTION 567 #ifndef DUMP_SEPARATE_SECTION
568 printf ("Dumping bss onto end of executable...\n"); 568 DUMP_MSG (("Dumping bss onto end of executable...\n"));
569 569
570 index += size; 570 index += size;
571 size = bss_size; 571 size = bss_size;
572 bss_data = bss_start; 572
573 573 DUMP_MSG (("\t0x%08x BSS start in process.\n", bss_start));
574 DUMP_MSG (("\t0x%08x BSS start in process.\n", bss_data));
575 DUMP_MSG (("\t0x%08x BSS offset in executable.\n", index)); 574 DUMP_MSG (("\t0x%08x BSS offset in executable.\n", index));
576 DUMP_MSG (("\t0x%08x BSS size in bytes.\n", size)); 575 DUMP_MSG (("\t0x%08x BSS size in bytes.\n", size));
577 memcpy ((char *) p_outfile->file_base + index, bss_data, size); 576 memcpy ((char *) p_outfile->file_base + index, bss_start, size);
578 #endif 577 #endif
579 } 578 }
580 579
581 #undef DUMP_MSG 580 #undef DUMP_MSG
582 581