diff options
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 3 | ||||
| -rw-r--r-- | lld/test/ELF/splitstacks.s | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 837181ec3cf..951820a6c77 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -245,6 +245,9 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) { if (Name == ".note.GNU-stack") return InputSection<ELFT>::Discarded; + if (Name == ".note.GNU-split-stack") + error("Objects using splitstacks are not supported"); + // A MIPS object file has a special section that contains register // usage info, which needs to be handled by the linker specially. if (Config->EMachine == EM_MIPS && Name == ".reginfo") { diff --git a/lld/test/ELF/splitstacks.s b/lld/test/ELF/splitstacks.s new file mode 100644 index 00000000000..809ed2b3a47 --- /dev/null +++ b/lld/test/ELF/splitstacks.s @@ -0,0 +1,11 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o + +# RUN: not ld.lld %t1.o -o %t 2>&1 | FileCheck %s +# CHECK: Objects using splitstacks are not supported + +.globl _start +_start: + nop + +.section .note.GNU-split-stack,"",@progbits |

