[llvm] [MC] Make .note.GNU-stack explicit for the trampoline case (PR #151754)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 22:16:52 PDT 2025


================
@@ -630,7 +630,8 @@ int main(int argc, char **argv) {
                : MAB->createObjectWriter(*OS),
         std::unique_ptr<MCCodeEmitter>(CE), *STI));
     if (NoExecStack)
-      Str->switchSection(Ctx.getAsmInfo()->getNonexecutableStackSection(Ctx));
+      Str->switchSection(
+          Ctx.getAsmInfo()->getStackSection(Ctx, /* Exec */ false));
----------------
MaskRay wrote:

Canonical way (preferred by clang-tidy) `/*Exec=*/false`. ditto above

https://github.com/llvm/llvm-project/pull/151754


More information about the llvm-commits mailing list