summaryrefslogtreecommitdiff
path: root/src/dlls/mscordac
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2016-11-09 17:28:29 -0800
committerMike McLaughlin <mikem@microsoft.com>2016-11-09 17:28:29 -0800
commit387613639c271615abae6c69c3344caedfca13b3 (patch)
tree1e18e98ca5c82384bb76133db507430dc5cc3f2c /src/dlls/mscordac
parentc637c919adcd0c0d7fcd8818810bcb727408fa51 (diff)
downloadcoreclr-387613639c271615abae6c69c3344caedfca13b3.tar.gz
coreclr-387613639c271615abae6c69c3344caedfca13b3.tar.bz2
coreclr-387613639c271615abae6c69c3344caedfca13b3.zip
Fix missing exports in mscordaccore.so (#8058)
I have recently added some exports to the mscordaccore.so and it was found that they were not honored and libsos.so got some unresolved symbols. I have found that the issue is that unlike for libcoreclr.so, we were not asking linker to include the whole PAL and so it has eliminated those functions due to the fact they were not called from the PAL itself. This change fixes it.
Diffstat (limited to 'src/dlls/mscordac')
-rw-r--r--src/dlls/mscordac/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dlls/mscordac/CMakeLists.txt b/src/dlls/mscordac/CMakeLists.txt
index 02bba4a058..8780db904d 100644
--- a/src/dlls/mscordac/CMakeLists.txt
+++ b/src/dlls/mscordac/CMakeLists.txt
@@ -45,6 +45,10 @@ if(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD OR CLR_CMAKE_PLATFORM_
set(START_LIBRARY_GROUP -Wl,--start-group)
set(END_LIBRARY_GROUP -Wl,--end-group)
+ # These options are used to force every object to be included even if it's unused.
+ set(START_WHOLE_ARCHIVE -Wl,--whole-archive)
+ set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive)
+
# Add linker exports file option
set(EXPORTS_LINKER_OPTION -Wl,--version-script=${EXPORTS_FILE})
endif(CLR_CMAKE_PLATFORM_LINUX OR CLR_CMAKE_PLATFORM_FREEBSD OR CLR_CMAKE_PLATFORM_NETBSD)
@@ -112,7 +116,9 @@ if(WIN32)
else(WIN32)
list(APPEND COREDAC_LIBRARIES
mscorrc_debug
+ ${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
coreclrpal
+ ${END_WHOLE_ARCHIVE}
palrt
)
endif(WIN32)
@@ -120,4 +126,4 @@ endif(WIN32)
target_link_libraries(mscordaccore PRIVATE ${COREDAC_LIBRARIES})
# add the install targets
-install_clr(mscordaccore) \ No newline at end of file
+install_clr(mscordaccore)