aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/invalid/invalid-soname.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/invalid/invalid-soname.test')
-rw-r--r--test/ELF/invalid/invalid-soname.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ELF/invalid/invalid-soname.test b/test/ELF/invalid/invalid-soname.test
new file mode 100644
index 000000000000..8641465acd50
--- /dev/null
+++ b/test/ELF/invalid/invalid-soname.test
@@ -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