HomePhabricator

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

Description

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

Summary:
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.

Reviewers: thanm, rnk, luqmana

Reviewed By: rnk

Subscribers: llvm-commits

Patch by Cherry Zhang <cherryyz@google.com>

Differential Revision: https://reviews.llvm.org/D38051

Details

Committed
thanmSep 27 2017, 12:34 PM
Reviewer
rnk
Differential Revision
D38051: [CodeGen] Emit necessary .note sections for -fsplit-stack
Parents
rL314334: [CUDA] Work around conflicting function definitions in CUDA-9 headers.
Branches
Unknown
Tags
Unknown