Changeset 1665

Show
Ignore:
Timestamp:
02/17/98 01:45:16 (11 years ago)
Author:
himi
Message:

Emacs 20.3.5 FSF import

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/GNU/src/unexw32.c

    r1651 r1665  
    100100  extern void mainCRTStartup (void); 
    101101 
    102 #if 1 
     102#if 0 
    103103  /* Give us a way to debug problems with crashes on startup when 
    104104     running under the MSVC profiler. */ 
     
    500500#define ROUND_UP_DST(align) \ 
    501501  (dst = p_outfile->file_base + ROUND_UP (DST_TO_OFFSET (), (align))) 
    502 #define ROUND_UP_DST_AND_ZERO(align)                                            \ 
    503   do {                                                                          \ 
    504     unsigned char *newdst = p_outfile->file_base                                \ 
    505       + ROUND_UP (DST_TO_OFFSET (), (align));                                   \ 
    506     /* Zero the alignment slop; it may actually initialize real data.  */       \ 
    507     memset (dst, 0, newdst - dst);                                              \ 
    508     dst = newdst;                                                               \ 
    509   } while (0) 
    510502 
    511503  /* Copy the source image sequentially, ie. section by section after 
     
    531523              nt_header->FileHeader.NumberOfSections * sizeof (*section)); 
    532524 
    533   /* Align the first section's raw data area, and set the header size 
    534      field accordingly.  */ 
    535   ROUND_UP_DST_AND_ZERO (dst_nt_header->OptionalHeader.FileAlignment); 
    536   dst_nt_header->OptionalHeader.SizeOfHeaders = DST_TO_OFFSET (); 
    537  
    538525  for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) 
    539526    { 
     
    541528      sprintf (msg, "Copying raw data for %s...", section->Name); 
    542529 
     530      /* Align the section's raw data area.  */ 
     531      ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); 
    543532      dst_save = dst; 
    544533 
     
    553542        (msg, OFFSET_TO_PTR (section->PointerToRawData, p_infile), 
    554543         section->SizeOfRawData); 
    555       /* Ensure alignment slop is zeroed.  */ 
    556       ROUND_UP_DST_AND_ZERO (dst_nt_header->OptionalHeader.FileAlignment); 
    557544 
    558545      /* Note that various sections below may be aliases.  */ 
     
    622609        } 
    623610 
    624       /* Align the section's raw data area.  */ 
    625       ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); 
    626  
    627611      section++; 
    628612      dst_section++; 
    629613    } 
     614 
     615  /* Pad out the final section raw data area.  */ 
     616  ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); 
    630617 
    631618  /* Copy remainder of source image.  */