Index: lld/trunk/ELF/InputFiles.cpp =================================================================== --- lld/trunk/ELF/InputFiles.cpp +++ lld/trunk/ELF/InputFiles.cpp @@ -245,6 +245,9 @@ if (Name == ".note.GNU-stack") return InputSection::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") { Index: lld/trunk/test/ELF/splitstacks.s =================================================================== --- lld/trunk/test/ELF/splitstacks.s +++ lld/trunk/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