[lld] r339880 - [LLD][ELF] - Add a test case for DT_SONAME entry reading.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 16 07:07:29 PDT 2018
Author: grimar
Date: Thu Aug 16 07:07:29 2018
New Revision: 339880
URL: http://llvm.org/viewvc/llvm-project?rev=339880&view=rev
Log:
[LLD][ELF] - Add a test case for DT_SONAME entry reading.
This covers a following line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L899
Added:
lld/trunk/test/ELF/invalid/invalid-soname.test
Added: lld/trunk/test/ELF/invalid/invalid-soname.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/invalid-soname.test?rev=339880&view=auto
==============================================================================
--- lld/trunk/test/ELF/invalid/invalid-soname.test (added)
+++ lld/trunk/test/ELF/invalid/invalid-soname.test Thu Aug 16 07:07:29 2018
@@ -0,0 +1,18 @@
+# REQUIRES: x86
+# RUN: yaml2obj %s -o %t.so
+# RUN: not ld.lld %t.so -o %t.exe 2>&1 | FileCheck %s
+
+# CHECK: error: {{.*}}.so: invalid DT_SONAME entry
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_DYN
+ Machine: EM_X86_64
+Sections:
+ - Name: .test
+ Type: SHT_DYNAMIC
+ Flags: [ SHF_ALLOC ]
+ Content: "0e000000000000000000000000000001"
+ Link: .strtab
More information about the llvm-commits
mailing list