Add a comment about .note.GNU-split-stack.

llvm-svn: 295941
This commit is contained in:
Rui Ueyama 2017-02-23 07:35:11 +00:00
parent 6e670cf44f
commit c1a0ac2c4a
1 changed files with 4 additions and 0 deletions

View File

@ -430,6 +430,10 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec,
if (Name == ".note.GNU-stack")
return &InputSection<ELFT>::Discarded;
// Split stacks is a feature to support a discontiguous stack. At least
// as of 2017, it seems that the feature is not being used widely.
// Only GNU gold supports that. We don't. For the details about that,
// see https://gcc.gnu.org/wiki/SplitStacks
if (Name == ".note.GNU-split-stack") {
error("objects using splitstacks are not supported");
return &InputSection<ELFT>::Discarded;