This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e6cc5a9fff4689e8b0818e0a21f59f65f1ce7fd3 (commit)
       via  5487b1be38c2003132ec4ddbb1dca615474777e4 (commit)
      from  54329e174573e7d6f5aa497074e4a37bd8167750 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6cc5a9fff4689e8b0818e0a21f59f65f1ce7fd3
commit e6cc5a9fff4689e8b0818e0a21f59f65f1ce7fd3
Merge: 54329e1 5487b1b
Author:     Bill Hoffman <bill.hoff...@kitware.com>
AuthorDate: Thu Sep 10 17:16:13 2015 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Sep 10 17:16:13 2015 -0400

    Merge topic 'fix_64bit_autodef' into next
    
    5487b1be Fix autoexport feature for 64 bit Windows builds by not removing 
leading _


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5487b1be38c2003132ec4ddbb1dca615474777e4
commit 5487b1be38c2003132ec4ddbb1dca615474777e4
Author:     Bill Hoffman <bill.hoff...@kitware.com>
AuthorDate: Thu Sep 10 17:12:41 2015 -0400
Commit:     Bill Hoffman <bill.hoff...@kitware.com>
CommitDate: Thu Sep 10 17:12:41 2015 -0400

    Fix autoexport feature for 64 bit Windows builds by not removing leading _
    
    With 64 bit windows builds, there is no need to remove the leading
    underscore from all the symbols.  This is because it does not have
    one in the .obj file unless it is really in the name.  This did
    not cause any trouble until VS 2015 which has some system functions
    that have a leading underscore that end up in the .def file.

diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx
index 11e3f34..dc4db63 100644
--- a/Source/bindexplib.cxx
+++ b/Source/bindexplib.cxx
@@ -173,7 +173,7 @@ public:
    */
 
    DumpSymbols(ObjectHeaderType* ih,
-               FILE* fout) {
+               FILE* fout, bool is64) {
       this->ObjectImageHeader = ih;
       this->SymbolTable = (SymbolTableType*)
       ((DWORD_PTR)this->ObjectImageHeader
@@ -183,6 +183,7 @@ public:
         GetSectionHeaderOffset(this->ObjectImageHeader);
       this->ImportFlag = true;
       this->SymbolCount = this->ObjectImageHeader->NumberOfSymbols;
+      this->Is64Bit = is64;
    }
 
   /*
@@ -287,7 +288,14 @@ public:
                   symbol.erase(posAt);
                }
             }
-            if (symbol[0] == '_') symbol.erase(0,1);
+            // For 64 bit builds we don't need to remove _
+            if(!this->Is64Bit)
+              {
+              if (symbol[0] == '_')
+                {
+                symbol.erase(0,1);
+                }
+              }
             if (this->ImportFlag) {
                this->ImportFlag = false;
                fprintf(this->FileOut,"EXPORTS \n");
@@ -355,6 +363,7 @@ private:
   PIMAGE_SECTION_HEADER SectionHeaders;
   ObjectHeaderType* ObjectImageHeader;
   SymbolTableType*  SymbolTable;
+  bool Is64Bit;
 };
 
 bool
@@ -406,7 +415,8 @@ DumpFile(const char* filename, FILE *fout)
       * and IMAGE_FILE_HEADER.SizeOfOptionalHeader == 0;
       */
       DumpSymbols<IMAGE_FILE_HEADER, IMAGE_SYMBOL>
-        symbolDumper((PIMAGE_FILE_HEADER) lpFileBase, fout);
+        symbolDumper((PIMAGE_FILE_HEADER) lpFileBase, fout,
+                     (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64));
       symbolDumper.DumpObjFile();
    } else {
       // check for /bigobj format
@@ -414,7 +424,8 @@ DumpFile(const char* filename, FILE *fout)
         (cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase;
       if(h->Sig1 == 0x0 && h->Sig2 == 0xffff) {
          DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX>
-           symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, fout);
+           symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, fout,
+                        (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64));
          symbolDumper.DumpObjFile();
       } else {
          printf("unrecognized file format in '%s'\n", filename);

-----------------------------------------------------------------------

Summary of changes:
 Source/bindexplib.cxx |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to