From cdb1881142479ef4a92a25ea713b1d1c7b5be249 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 12 Jan 2024 19:53:12 +0100 Subject: cmake: add noexec stack on ELF platforms --- cmake/opentrack-platform.cmake | 1 + 1 file changed, 1 insertion(+) 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() -- cgit v1.2.3