Skip to content

Commit d546de7

Browse files
mmitcheelinor-fung
andauthored
Fix host linker options to have -Bsymbolic (#34534) (#34570)
* Fix host linker options to have -Bsymbolic * Remove -Bsymbolic-functions Co-authored-by: Elinor Fung <47805090+elinor-fung@users.noreply.github.com>
1 parent 8f6b899 commit d546de7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/installer/corehost/cli/common.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ if(CLR_CMAKE_TARGET_WIN32)
3232
list(APPEND SOURCES ${HEADERS})
3333
endif()
3434

35+
# This is required to map a symbol reference to a matching definition local to the module (.so)
36+
# containing the reference instead of using definitions from other modules.
37+
if(CLR_CMAKE_TARGET_LINUX)
38+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic")
39+
endif()
40+
3541
function(set_common_libs TargetType)
3642

3743
# Libraries used for exe projects

0 commit comments

Comments
 (0)