ELF2: LinkerScript: Handle INPUT as a synonym for GROUP.
In our name resolution algorithm, --start-group and --end-group have
no special meaning.
llvm-svn: 249961
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 34fda2d..e29c717 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -55,7 +55,7 @@
StringRef Tok = next();
if (Tok == "ENTRY") {
readEntry();
- } else if (Tok == "GROUP") {
+ } else if (Tok == "GROUP" || Tok == "INPUT") {
readGroup();
} else if (Tok == "INCLUDE") {
readInclude();
diff --git a/lld/test/elf2/linkerscript.s b/lld/test/elf2/linkerscript.s
index a280ed9..4140a06 100644
--- a/lld/test/elf2/linkerscript.s
+++ b/lld/test/elf2/linkerscript.s
@@ -5,6 +5,10 @@
# RUN: ld.lld2 -o %t2 %t.script
# RUN: llvm-readobj %t2 > /dev/null
+# RUN: echo "INPUT(" %t ")" > %t.script
+# RUN: ld.lld2 -o %t2 %t.script
+# RUN: llvm-readobj %t2 > /dev/null
+
# RUN: echo "GROUP(" %t.script2 ")" > %t.script1
# RUN: echo "GROUP(" %t ")" > %t.script2
# RUN: ld.lld2 -o %t2 %t.script1