diff options
author | Zsolt Parragi <zsolt.parragi@cancellar.hu> | 2017-02-24 09:06:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-28 14:49:12 (GMT) |
commit | 85e08370d0774397f42a7d45d07f22b3a817fe10 (patch) | |
tree | 65eaf7954bcbb864c1bbe3076294561b0832e7cf /Tests/RunCMake/AutoExportDll/AutoExport.cmake | |
parent | 78104bd7bca4bd9b4b7a5c17622838a33843138e (diff) | |
download | CMake-85e08370d0774397f42a7d45d07f22b3a817fe10.zip CMake-85e08370d0774397f42a7d45d07f22b3a817fe10.tar.gz CMake-85e08370d0774397f42a7d45d07f22b3a817fe10.tar.bz2 |
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.
Diffstat (limited to 'Tests/RunCMake/AutoExportDll/AutoExport.cmake')
-rw-r--r-- | Tests/RunCMake/AutoExportDll/AutoExport.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
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) |