dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/image pecoff_writer.c,1.8,1.9


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/image pecoff_writer.c,1.8,1.9
Date: Tue, 26 Nov 2002 00:04:48 -0500

Update of /cvsroot/dotgnu-pnet/pnet/image
In directory subversions:/tmp/cvs-serv31746/image

Modified Files:
        pecoff_writer.c 
Log Message:


_ILWriteFinal: back-patch the correct address for the ".reloc" section
in the optional PE/COFF header.


Index: pecoff_writer.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/pecoff_writer.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** pecoff_writer.c     26 Nov 2002 02:34:17 -0000      1.8
--- pecoff_writer.c     26 Nov 2002 05:04:46 -0000      1.9
***************
*** 551,554 ****
--- 551,555 ----
        unsigned long dataSection;
        unsigned long tlsSection;
+       unsigned long relocSection;
  
        /* Set the entry point token code */
***************
*** 748,751 ****
--- 749,753 ----
        dataSection = 0;
        tlsSection = 0;
+       relocSection = 0;
        while(section != 0)
        {
***************
*** 758,761 ****
--- 760,767 ----
                        tlsSection = imageSize;
                }
+               else if(!strcmp(section->name, ".reloc"))
+               {
+                       relocSection = imageSize;
+               }
                WriteSection(writer, table, section->name,
                                         imageSize, offset, section->length, 
section->flags);
***************
*** 798,803 ****
        if(writer->type != IL_IMAGETYPE_OBJ)
        {
!               WriteBackPatch32(writer, writer->optOffset + 136,
!                                                0x2000 + ((textLength + 8191) 
& ~8191));
                WriteBackPatch32(writer, writer->optOffset + 140, 12);
        }
--- 804,808 ----
        if(writer->type != IL_IMAGETYPE_OBJ)
        {
!               WriteBackPatch32(writer, writer->optOffset + 136, relocSection);
                WriteBackPatch32(writer, writer->optOffset + 140, 12);
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]