[flang-commits] [flang] 179badc - [flang][docs] Add a mention about -fsafe-trampoline to FAQ.md (#207656)
via flang-commits
flang-commits at lists.llvm.org
Wed Jul 8 04:08:46 PDT 2026
Author: Yusuke MINATO
Date: 2026-07-08T20:08:40+09:00
New Revision: 179badc020b48f736341408fdb01537ada3eedfb
URL: https://github.com/llvm/llvm-project/commit/179badc020b48f736341408fdb01537ada3eedfb
DIFF: https://github.com/llvm/llvm-project/commit/179badc020b48f736341408fdb01537ada3eedfb.diff
LOG: [flang][docs] Add a mention about -fsafe-trampoline to FAQ.md (#207656)
Co-authored-by: Tarun Prabhu <tarunprabhu at gmail.com>
Added:
Modified:
flang/docs/FAQ.md
Removed:
################################################################################
diff --git a/flang/docs/FAQ.md b/flang/docs/FAQ.md
index 0b0b6ebdacf0b..c220d469380ce 100644
--- a/flang/docs/FAQ.md
+++ b/flang/docs/FAQ.md
@@ -50,3 +50,7 @@ ld.lld: error: src.o: requires an executable stack, but -z execstack is not spec
flang-22: error: linker command failed with exit code 1 (use -v to see invocation)
$ flang src.f90 -fuse-ld=lld -Wl,-z,execstack
```
+
+Since LLVM 23, Flang has a new compiler flag `-fsafe-trampoline`, which is disabled by default and is currently supported on x86-64 and AArch64 targets.
+If this is enabled, the trampoline is generated on a dedicated `mmap`'d region instead of the stack.
+Where supported, we recommend using this flag to reduce the security risk of an executable stack.
More information about the flang-commits
mailing list