[libunwind] Add CMake option to enable execute-only code generation on AArch64 (#140554)
For a full toolchain supporting execute-only code generation the runtime libraries also need to be pre-compiled with it enabled. The generic `RUNTIMES_EXECUTE_ONLY_CODE` CMake option can now be used during build configuration to enable execute-only code generation in libunwind. Related RFC: https://discourse.llvm.org/t/rfc-execute-only-code-support-for-runtime-libraries-on-aarch64/86180
This commit is contained in:
parent
9d18e92ee7
commit
4508f44af7
@ -332,6 +332,10 @@ if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (RUNTIMES_EXECUTE_ONLY_CODE)
|
||||
add_compile_definitions(_LIBUNWIND_EXECUTE_ONLY_CODE)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# Setup Source Code
|
||||
#===============================================================================
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
|
||||
#if defined(_AIX)
|
||||
.toc
|
||||
#elif defined(__aarch64__) && defined(__ELF__) && defined(_LIBUNWIND_EXECUTE_ONLY_CODE)
|
||||
.section .text,"axy",@progbits,unique,0
|
||||
#else
|
||||
.text
|
||||
#endif
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
|
||||
#if defined(_AIX)
|
||||
.toc
|
||||
#elif defined(__aarch64__) && defined(__ELF__) && defined(_LIBUNWIND_EXECUTE_ONLY_CODE)
|
||||
.section .text,"axy",@progbits,unique,0
|
||||
#else
|
||||
.text
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user