[PATCH] D38051: [CodeGen] Emit necessary .note sections for -fsplit-stack

Cherry Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 13:27:18 PDT 2017


cherry created this revision.

According to https://gcc.gnu.org/wiki/SplitStacks, the linker expects a zero-sized .note.GNU-split-stack section if split-stack is used (and also .note.GNU-no-split-stack section if it also contains non-split-stack functions), so it can handle the cases where a split-stack function calls non-split-stack function.

      

This change adds the sections if needed.

Fixes PR #34670.


https://reviews.llvm.org/D38051

Files:
  include/llvm/CodeGen/MachineModuleInfo.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/MachineModuleInfo.cpp
  lib/CodeGen/PrologEpilogInserter.cpp
  test/CodeGen/X86/segmented-stacks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38051.115887.patch
Type: text/x-patch
Size: 4729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/1abd1703/attachment.bin>


More information about the llvm-commits mailing list