This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by cherry on Sep 19 2017, 1:27 PM.

Details

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.

Diff Detail

Event Timeline

cherry created this revision.Sep 19 2017, 1:27 PM
rnk accepted this revision.Sep 27 2017, 11:15 AM

Looks good, thanks!

This revision is now accepted and ready to land.Sep 27 2017, 11:15 AM

Thank you for the review!

This revision was automatically updated to reflect the committed changes.