[LLD][ELF] - Add a test for ScriptParser::readOutputSectionDescription.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 9 Aug 2018 12:14:00 +0000 (12:14 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 9 Aug 2018 12:14:00 +0000 (12:14 +0000)
This covers the following line:
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L415

llvm-svn: 339333

lld/test/ELF/linkerscript/sort.s

index 6390ced..abee468 100644 (file)
 # RUN: ld.lld -o %t11 --script %t10.script %t2.o %t1.o
 # RUN: llvm-objdump -s %t11 | FileCheck -check-prefix=SORTED_A %s
 
+## There is no SORTFOO command, check we handle it properly.
+# RUN: echo "SECTIONS { .aaa : { SORTFOO } }" > %t3.script
+# RUN: not ld.lld -o %t3 --script %t3.script %t1.o 2>&1 | FileCheck %s -check-prefix=SORTFOO
+# SORTFOO: unknown command SORTFOO
+
 .global _start
 _start:
  nop