[lld] r339342 - [LLD][ELF] - Add a test for ScriptParser::readPhdrType().

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 06:19:10 PDT 2018


Author: grimar
Date: Thu Aug  9 06:19:10 2018
New Revision: 339342

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

This adds a test for https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L1289.

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

Modified: lld/trunk/test/ELF/linkerscript/phdrs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/phdrs.s?rev=339342&r1=339341&r2=339342&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/phdrs.s (original)
+++ lld/trunk/test/ELF/linkerscript/phdrs.s Thu Aug  9 06:19:10 2018
@@ -134,6 +134,10 @@
 # RUN: not ld.lld -o /dev/null --script %t1.script %t 2>&1 | FileCheck --check-prefix=FOOHDR %s
 # FOOHDR: error: {{.*}}.script:1: unexpected header attribute: FOOHDR
 
+# RUN: echo "PHDRS { text PT_FOO FOOHDR; }" > %t1.script
+# RUN: not ld.lld -o /dev/null --script %t1.script %t 2>&1 | FileCheck --check-prefix=PTFOO %s
+# PTFOO: invalid program header type: PT_FOO
+
 .global _start
 _start:
  nop




More information about the llvm-commits mailing list