[PATCH] D13703: [ELF2/Linkerscript] Skip semicolon in linker directives parsing
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 13:50:59 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250223: [ELF2/Linkerscript] Skip semicolon in linker directives parsing. (authored by davide).
Changed prior to commit:
http://reviews.llvm.org/D13703?vs=37277&id=37285#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13703
Files:
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/test/elf2/linkerscript.s
Index: lld/trunk/test/elf2/linkerscript.s
===================================================================
--- lld/trunk/test/elf2/linkerscript.s
+++ lld/trunk/test/elf2/linkerscript.s
@@ -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
Index: lld/trunk/ELF/LinkerScript.cpp
===================================================================
--- lld/trunk/ELF/LinkerScript.cpp
+++ lld/trunk/ELF/LinkerScript.cpp
@@ -59,6 +59,8 @@
void LinkerScript::run() {
while (!atEOF()) {
StringRef Tok = next();
+ if (Tok == ";")
+ continue;
if (Tok == "ENTRY") {
readEntry();
} else if (Tok == "GROUP" || Tok == "INPUT") {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13703.37285.patch
Type: text/x-patch
Size: 1054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151013/51cb4372/attachment.bin>
More information about the llvm-commits
mailing list