forked from OSchip/llvm-project
[ELF2/Linkerscript] Skip semicolon in linker directives parsing.
The documentation says: "You may separate commands using semicolons", so they seem to be optional. Differential Revision: http://reviews.llvm.org/D13703 llvm-svn: 250223
This commit is contained in:
parent
1c1add44b6
commit
10d268d62c
|
@ -59,6 +59,8 @@ private:
|
|||
void LinkerScript::run() {
|
||||
while (!atEOF()) {
|
||||
StringRef Tok = next();
|
||||
if (Tok == ";")
|
||||
continue;
|
||||
if (Tok == "ENTRY") {
|
||||
readEntry();
|
||||
} else if (Tok == "GROUP" || Tok == "INPUT") {
|
||||
|
|
|
@ -76,6 +76,14 @@
|
|||
# RUN: ld.lld2 %t.script %t
|
||||
# RUN: llvm-readobj %t.out > /dev/null
|
||||
|
||||
# RUN: echo ";SEARCH_DIR(x);SEARCH_DIR(y);" > %t.script
|
||||
# RUN: ld.lld2 %t.script %t
|
||||
# RUN: llvm-readobj %t.out > /dev/null
|
||||
|
||||
# RUN: echo ";" > %t.script
|
||||
# RUN: ld.lld2 %t.script %t
|
||||
# RUN: llvm-readobj %t.out > /dev/null
|
||||
|
||||
# RUN: echo "INCLUDE " %t.script2 "OUTPUT(" %t.out ")" > %t.script1
|
||||
# RUN: echo "GROUP(" %t ")" > %t.script2
|
||||
# RUN: ld.lld2 %t.script1
|
||||
|
|
Loading…
Reference in New Issue