[lld] r192360 - [ELF] Return error from invalid linker script parse.
Shankar Easwaran
shankare at codeaurora.org
Thu Oct 10 09:59:53 PDT 2013
Author: shankare
Date: Thu Oct 10 11:59:53 2013
New Revision: 192360
URL: http://llvm.org/viewvc/llvm-project?rev=192360&view=rev
Log:
[ELF] Return error from invalid linker script parse.
Added:
lld/trunk/test/elf/linkerscript/
lld/trunk/test/elf/linkerscript/Inputs/
lld/trunk/test/elf/linkerscript/Inputs/invalid.ls
lld/trunk/test/elf/linkerscript/invalid.test
Modified:
lld/trunk/include/lld/Driver/GnuLdInputGraph.h
Modified: lld/trunk/include/lld/Driver/GnuLdInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/GnuLdInputGraph.h?rev=192360&r1=192359&r2=192360&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/GnuLdInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/GnuLdInputGraph.h Thu Oct 10 11:59:53 2013
@@ -106,8 +106,8 @@ public:
default:
// Process Linker script
- _elfLinkingContext.getLinkerScriptReader().parseFile(_buffer, _files);
- return error_code::success();
+ return _elfLinkingContext.getLinkerScriptReader().parseFile(_buffer,
+ _files);
}
}
Added: lld/trunk/test/elf/linkerscript/Inputs/invalid.ls
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/linkerscript/Inputs/invalid.ls?rev=192360&view=auto
==============================================================================
--- lld/trunk/test/elf/linkerscript/Inputs/invalid.ls (added)
+++ lld/trunk/test/elf/linkerscript/Inputs/invalid.ls Thu Oct 10 11:59:53 2013
@@ -0,0 +1 @@
+GROUP(
Added: lld/trunk/test/elf/linkerscript/invalid.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/linkerscript/invalid.test?rev=192360&view=auto
==============================================================================
--- lld/trunk/test/elf/linkerscript/invalid.test (added)
+++ lld/trunk/test/elf/linkerscript/invalid.test Thu Oct 10 11:59:53 2013
@@ -0,0 +1,5 @@
+# Check for errors from invalid linker scripts
+RUN: not lld -flavor gnu -target x86_64 %p/Inputs/invalid.ls 2> %t.err
+RUN: FileCheck %s < %t.err
+
+CHECK: {{.*}}invalid.ls: Error parsing linker script
More information about the llvm-commits
mailing list