[flang-commits] [flang] [flang][docs] Add a mention about -fsafe-trampoline to FAQ.md (PR #207656)
Yusuke MINATO via flang-commits
flang-commits at lists.llvm.org
Sun Jul 5 22:52:21 PDT 2026
https://github.com/yus3710-fj created https://github.com/llvm/llvm-project/pull/207656
None
>From ee7aa26f1925e287a92c45b0c73e2c83b37985ae Mon Sep 17 00:00:00 2001
From: Yusuke MINATO <minato.yusuke at fujitsu.com>
Date: Fri, 3 Jul 2026 15:27:03 +0900
Subject: [PATCH] [flang][docs] Add a mention about `-fsafe-trampoline` to
FAQ.md
---
flang/docs/FAQ.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/flang/docs/FAQ.md b/flang/docs/FAQ.md
index 0b0b6ebdacf0b..5957b0e731757 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.
+If this is enabled, the trampoline is generated on a dedicated `mmap`'d region instead of the stack.
+Therefore, we **strongly recommend** using this flag to reduce the security risk.
More information about the flang-commits
mailing list