diff options
author | Woongsuk Cho <ws77.cho@samsung.com> | 2020-03-16 10:48:34 +0900 |
---|---|---|
committer | 이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com> | 2020-03-16 15:54:02 +0900 |
commit | 96426f220e8965eea7b402f0635e054b68ed40b6 (patch) | |
tree | 313ecedf434bce2cb3e9d738931e2efe3b4c1005 /src | |
parent | d00423b551ca8963cc3d4f9f84b37f0a2a2628e7 (diff) | |
download | coreclr-96426f220e8965eea7b402f0635e054b68ed40b6.tar.gz coreclr-96426f220e8965eea7b402f0635e054b68ed40b6.tar.bz2 coreclr-96426f220e8965eea7b402f0635e054b68ed40b6.zip |
[Tizen] Add "-pie" option to "ilasm, ildasm" to avoid ASLR violationsubmit/tizen_5.5/20200316.065806submit/tizen/20200316.065814accepted/tizen/unified/20200317.063623accepted/tizen/5.5/unified/20200317.160115
To apply -pie option to "ilasm, ildasm", mscorpe, unixcoreclrloader should be built with -fPIC option
Diffstat (limited to 'src')
-rw-r--r-- | src/dlls/mscorpe/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/ilasm/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/ildasm/exe/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/ildasm/unixcoreclrloader/CMakeLists.txt | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/src/dlls/mscorpe/CMakeLists.txt b/src/dlls/mscorpe/CMakeLists.txt index eb8489cdb6..2afe3e9106 100644 --- a/src/dlls/mscorpe/CMakeLists.txt +++ b/src/dlls/mscorpe/CMakeLists.txt @@ -2,6 +2,10 @@ project(mscorpe) add_definitions(-DFEATURE_CORECLR) +if(CLR_CMAKE_PLATFORM_UNIX) + add_compile_options(-fPIC) +endif(CLR_CMAKE_PLATFORM_UNIX) + set(MSCORPE_SOURCES iceefilegen.cpp ceefilegenwriter.cpp diff --git a/src/ilasm/CMakeLists.txt b/src/ilasm/CMakeLists.txt index 6117030dcc..cf983797dc 100644 --- a/src/ilasm/CMakeLists.txt +++ b/src/ilasm/CMakeLists.txt @@ -62,6 +62,8 @@ _add_executable(ilasm ${ILASM_RESOURCES} ) +set_target_properties(ilasm PROPERTIES LINK_FLAGS -pie) + set(ILASM_LINK_LIBRARIES utilcodestaticnohost mscorpe diff --git a/src/ildasm/exe/CMakeLists.txt b/src/ildasm/exe/CMakeLists.txt index 196f2395b7..05dec6e1e3 100644 --- a/src/ildasm/exe/CMakeLists.txt +++ b/src/ildasm/exe/CMakeLists.txt @@ -54,6 +54,8 @@ _add_executable(ildasm ${ILDASM_RESOURCES} ) +set_target_properties(ildasm PROPERTIES LINK_FLAGS -pie) + set(ILDASM_LINK_LIBRARIES utilcodestaticnohost mdhotdata_full diff --git a/src/ildasm/unixcoreclrloader/CMakeLists.txt b/src/ildasm/unixcoreclrloader/CMakeLists.txt index 6a3916b961..596e58325a 100644 --- a/src/ildasm/unixcoreclrloader/CMakeLists.txt +++ b/src/ildasm/unixcoreclrloader/CMakeLists.txt @@ -1,5 +1,9 @@ project(unixcoreclrloader) +if(CLR_CMAKE_PLATFORM_UNIX) + add_compile_options(-fPIC) +endif(CLR_CMAKE_PLATFORM_UNIX) + include_directories(${CMAKE_SOURCE_DIR}/src/coreclr/hosts/unixcoreruncommon) add_library(unixcoreclrloader STATIC |