Skip to content

Commit

Permalink
-z noexecstack
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Sep 18, 2024
1 parent 7d97784 commit 1552df2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion create_resource.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ function(create_resource root input_paths lib)
COMMAND
ld
${arch-flag}
-z noexecstack
-r -o ${CMAKE_CURRENT_BINARY_DIR}/${lib}/obj/${lib}-res.o
-sectcreate binary ${short-lib} ${CMAKE_CURRENT_BINARY_DIR}/${lib}/all_res.bin
${CMAKE_CURRENT_BINARY_DIR}/${lib}/obj/stub.o
Expand Down Expand Up @@ -277,7 +278,7 @@ reinterpret_cast<void const*>(&_binary_${mangled-path}_start)},\n")
string(APPEND emplace-statements " m.emplace(\"${rel-path}\", ${id});\r\n")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${lib}/obj)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${lib}/obj/res_${id}.o
COMMAND ${resource-linker} ${flags} -r -b binary -o ${CMAKE_CURRENT_BINARY_DIR}/${lib}/obj/res_${id}.o ${rel-path}
COMMAND ${resource-linker} ${flags} -z noexecstack -r -b binary -o ${CMAKE_CURRENT_BINARY_DIR}/${lib}/obj/res_${id}.o ${rel-path}
DEPENDS ${p}
WORKING_DIRECTORY ${root}
COMMENT "Generating resource ${rel-path} (${CMAKE_CURRENT_BINARY_DIR}/${lib}/obj/res_${id}.o)"
Expand Down

0 comments on commit 1552df2

Please sign in to comment.