Apply partial relro security hardening 77/174677/1 accepted/tizen/4.0/unified/20180404.063438 submit/tizen_4.0/20180403.112554
authorsaerome.kim <saerome.kim@samsung.com>
Tue, 3 Apr 2018 10:12:08 +0000 (19:12 +0900)
committersaerome kim <saerome.kim@samsung.com>
Tue, 3 Apr 2018 10:54:05 +0000 (10:54 +0000)
Change-Id: Ic768751ec01780ae5029be23f76997076f8cbe30
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
CMakeLists.txt

index 4e39cfd..f2ce402 100755 (executable)
@@ -23,7 +23,7 @@ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall -Werror-implicit-function-declaration")
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fexceptions -fvisibility=hidden")
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
-SET(CMAKE_EXE_LINKER_FLAGS " -Wl,--as-needed -pie -Wl,--hash-style=both")
+SET(CMAKE_EXE_LINKER_FLAGS " -Wl,--as-needed -pie -Wl,--hash-style=both,-z,relro")
 
 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} pthread rt gcrypt)