From 868a25cc727593e3166cdd98cbe6fce19d9021eb Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Tue, 21 Nov 2023 12:06:37 +0900 Subject: [PATCH] Add Partial RELRO flags Change-Id: I3c491ca2cd5a44f0f27f36aaf488e18b4fc17a5b --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f422255..ed3d7f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -fPIC") +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -fPIC -Wl,-z,relro") SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions -fstack-protector-strong") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -lrt") SET(CMAKE_EXE_LINKER_FLAGS "-pie") -- 2.7.4