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 f9ea9e5b5716a3b37799af673375bb41d5cb5816 (commit) via 85e08370d0774397f42a7d45d07f22b3a817fe10 (commit) from 63f5ddc0f7c158543113352593ba6999c675814c (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9ea9e5b5716a3b37799af673375bb41d5cb5816 commit f9ea9e5b5716a3b37799af673375bb41d5cb5816 Merge: 63f5ddc 85e0837 Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Feb 28 09:53:35 2017 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Tue Feb 28 09:53:35 2017 -0500 Merge topic 'export-executable-symbols' into next 85e08370 bindexplib: Always export executable symbols, even they are also readable https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85e08370d0774397f42a7d45d07f22b3a817fe10 commit 85e08370d0774397f42a7d45d07f22b3a817fe10 Author: Zsolt Parragi <zsolt.parr...@cancellar.hu> AuthorDate: Fri Feb 24 10:06:43 2017 +0100 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Feb 28 09:49:12 2017 -0500 bindexplib: Always export executable symbols, even they are also readable Previously bindexplib discarded read-only non-function symbols even in executable/code sections, but in some specific cases they could still mark functions. An example is provided by nop.asm in the AuoExportDll test, which exports a function only marked by a label. This symbol can be used from C/C++ code, but without this change it would result in an unresolved external symbol when built as a DLL on Windows. diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index eded883..e41850a 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -308,7 +308,8 @@ public: this->DataSymbols.insert(symbol); } else { if ( pSymbolTable->Type || - !(SectChar & IMAGE_SCN_MEM_READ)) { + !(SectChar & IMAGE_SCN_MEM_READ) || + (SectChar & IMAGE_SCN_MEM_EXECUTE)) { this->Symbols.insert(symbol); } else { // printf(" strange symbol: %s \n",symbol.c_str()); diff --git a/Tests/RunCMake/AutoExportDll/AutoExport.cmake b/Tests/RunCMake/AutoExportDll/AutoExport.cmake index d37e896..a550005 100644 --- a/Tests/RunCMake/AutoExportDll/AutoExport.cmake +++ b/Tests/RunCMake/AutoExportDll/AutoExport.cmake @@ -11,5 +11,11 @@ if(MSVC) set_target_properties(say PROPERTIES ENABLE_EXPORTS ON) add_library(autoexport_for_exec SHARED hello2.c) target_link_libraries(autoexport_for_exec say) + if(NOT MSVC_VERSION VERSION_LESS 1600) + enable_language(ASM_MASM) + target_sources(autoexport PRIVATE nop.asm) + set_property(SOURCE nop.asm PROPERTY COMPILE_FLAGS /safeseh) + target_compile_definitions(say PRIVATE HAS_JUSTNOP) + endif() endif() target_link_libraries(say autoexport autoexport2) diff --git a/Tests/RunCMake/AutoExportDll/nop.asm b/Tests/RunCMake/AutoExportDll/nop.asm new file mode 100644 index 0000000..fd6892f --- /dev/null +++ b/Tests/RunCMake/AutoExportDll/nop.asm @@ -0,0 +1,12 @@ +IFDEF RAX +ELSE +.MODEL FLAT,C +ENDIF + +SOME SEGMENT EXECUTE READ + +public justnop +justnop: + ret + +END diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx index e966b1f..51060e8 100644 --- a/Tests/RunCMake/AutoExportDll/say.cxx +++ b/Tests/RunCMake/AutoExportDll/say.cxx @@ -12,6 +12,7 @@ int WINAPI foo(); // test regular C int bar(); int objlib(); +void justnop(); } // test c++ functions @@ -42,5 +43,8 @@ int main() bar(); objlib(); printf("\n"); +#ifdef HAS_JUSTNOP + justnop(); +#endif return 0; } ----------------------------------------------------------------------- Summary of changes: Source/bindexplib.cxx | 3 ++- Tests/RunCMake/AutoExportDll/AutoExport.cmake | 6 ++++++ Tests/RunCMake/AutoExportDll/nop.asm | 12 ++++++++++++ Tests/RunCMake/AutoExportDll/say.cxx | 4 ++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Tests/RunCMake/AutoExportDll/nop.asm hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits