summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-12 19:53:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-21 11:31:19 +0100
commit4f1e729de7a0b0d37f81d4277814a1c03c26e3f2 (patch)
treeb704d06d7c65ad8907d66a8b25fdafe1d1b8edd3
parentd44064e896b046ce301dd967fd17d229884ef046 (diff)
cmake: add noexec stack on ELF platforms
-rw-r--r--cmake/opentrack-platform.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index bd9fd62b..e806869c 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -95,6 +95,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
add_link_options(-Wl,--exclude-libs,ALL)
add_link_options(-Wl,-z,relro,-z,now)
add_link_options(-Wl,--as-needed)
+ add_link_options(-Wl,-z,nodlopen -Wl,-z,noexecstack)
add_compile_options(-fno-plt)
endif()
endif()