[lld] r339327 - [LLD][ELF] - Add a test for ScriptParser::readPhdrs(). NFCI.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 04:13:30 PDT 2018


Author: grimar
Date: Thu Aug  9 04:13:30 2018
New Revision: 339327

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

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


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=339327&r1=339326&r2=339327&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/phdrs.s (original)
+++ lld/trunk/test/ELF/linkerscript/phdrs.s Thu Aug  9 04:13:30 2018
@@ -130,6 +130,10 @@
 
 # BADHDR:       {{.*}}.script:1: section header 'bar' is not listed in PHDRS
 
+# RUN: echo "PHDRS { text PT_LOAD FOOHDR; }" > %t1.script
+# 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
+
 .global _start
 _start:
  nop




More information about the llvm-commits mailing list