diff options
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r-- | lld/ELF/InputFiles.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 6eb2dc65e6c..1aa03189dcc 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -262,8 +262,13 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) { if (Name == ".note.GNU-stack") return &InputSection<ELFT>::Discarded; - if (Name == ".note.GNU-split-stack") + if (Name == ".note.GNU-split-stack") { error("objects using splitstacks are not supported"); + return &InputSection<ELFT>::Discarded; + } + + if (Config->StripDebug && Name.startswith(".debug")) + return &InputSection<ELFT>::Discarded; // A MIPS object file has a special section that contains register // usage info, which needs to be handled by the linker specially. |