[lld] r339333 - [LLD][ELF] - Add a test for ScriptParser::readOutputSectionDescription.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 05:14:00 PDT 2018


Author: grimar
Date: Thu Aug  9 05:14:00 2018
New Revision: 339333

URL: http://llvm.org/viewvc/llvm-project?rev=339333&view=rev
Log:
[LLD][ELF] - Add a test for ScriptParser::readOutputSectionDescription.

This covers the following line:
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L415


Modified:
    lld/trunk/test/ELF/linkerscript/sort.s

Modified: lld/trunk/test/ELF/linkerscript/sort.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/sort.s?rev=339333&r1=339332&r2=339333&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/sort.s (original)
+++ lld/trunk/test/ELF/linkerscript/sort.s Thu Aug  9 05:14:00 2018
@@ -95,6 +95,11 @@
 # 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




More information about the llvm-commits mailing list