From 75004280af22edd22a3efb7b47d5d87f2da65354 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 19 Nov 2015 17:21:03 -0500 Subject: Fix auto export symbols for Dlls containing /bigobj for 64bit builds. This fixes a bug where 64 bit builds with /bigobj incorrectly determined that the object files were not 64 bit. This manifested itself with printf type functions showing up as undefined because the leading underscore was being removed and should not be removed. --- Source/bindexplib.cxx | 2 +- Tests/RunCMake/AutoExportDll/sub/sub.cxx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index 64621e0..e7263ae 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -422,7 +422,7 @@ DumpFile(const char* filename, DumpSymbols symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, symbols, dataSymbols, - (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64)); + (h->Machine == IMAGE_FILE_MACHINE_AMD64)); symbolDumper.DumpObjFile(); } else { printf("unrecognized file format in '%s'\n", filename); diff --git a/Tests/RunCMake/AutoExportDll/sub/sub.cxx b/Tests/RunCMake/AutoExportDll/sub/sub.cxx index 9766b41..9a3145e 100644 --- a/Tests/RunCMake/AutoExportDll/sub/sub.cxx +++ b/Tests/RunCMake/AutoExportDll/sub/sub.cxx @@ -1,4 +1,6 @@ +#include int sub() { + printf(""); return 10; } -- cgit v0.12 From c7ddc5f43821039f4c005271912da30ba0f213db Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 19 Nov 2015 17:21:03 -0500 Subject: Fix auto export symbols for Dlls containing /bigobj for 64bit builds. This fixes a bug where 64 bit builds with /bigobj incorrectly determined that the object files were not 64 bit. This manifested itself with printf type functions showing up as undefined because the leading underscore was being removed and should not be removed. --- Source/bindexplib.cxx | 2 +- Tests/RunCMake/AutoExportDll/sub/sub.cxx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index dc4db63..b250842 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -425,7 +425,7 @@ DumpFile(const char* filename, FILE *fout) if(h->Sig1 == 0x0 && h->Sig2 == 0xffff) { DumpSymbols symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, fout, - (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64)); + (h->Machine == IMAGE_FILE_MACHINE_AMD64)); symbolDumper.DumpObjFile(); } else { printf("unrecognized file format in '%s'\n", filename); diff --git a/Tests/RunCMake/AutoExportDll/sub/sub.cxx b/Tests/RunCMake/AutoExportDll/sub/sub.cxx index 9766b41..9a3145e 100644 --- a/Tests/RunCMake/AutoExportDll/sub/sub.cxx +++ b/Tests/RunCMake/AutoExportDll/sub/sub.cxx @@ -1,4 +1,6 @@ +#include int sub() { + printf(""); return 10; } -- cgit v0.12