[LLD][ELF] - Remove a binary from the inputs. NFCI.
authorGeorge Rimar <grimar@accesssoftek.com>
Mon, 22 Apr 2019 14:53:32 +0000 (14:53 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Mon, 22 Apr 2019 14:53:32 +0000 (14:53 +0000)
section-index.elf was removed and the corresponding test
was replaced with a yaml2obj based test.

llvm-svn: 358889

lld/test/ELF/invalid/Inputs/section-index.elf [deleted file]
lld/test/ELF/invalid/invalid-elf.test
lld/test/ELF/invalid/section-index.test [new file with mode: 0644]

diff --git a/lld/test/ELF/invalid/Inputs/section-index.elf b/lld/test/ELF/invalid/Inputs/section-index.elf
deleted file mode 100644 (file)
index ec5adcf..0000000
Binary files a/lld/test/ELF/invalid/Inputs/section-index.elf and /dev/null differ
index 385fc7e..40192ab 100644 (file)
 # RUN:   FileCheck --check-prefix=INVALID-BINDING %s
 # INVALID-BINDING: unexpected binding
 
-# RUN: not ld.lld %p/Inputs/section-index.elf -o %t2 2>&1 | \
-# RUN:   FileCheck --check-prefix=INVALID-SECTION-INDEX-LLD %s
-# INVALID-SECTION-INDEX-LLD: invalid section index
-
 # RUN: not ld.lld %p/Inputs/multiple-eh-relocs.elf -o %t2 2>&1 | \
 # RUN:   FileCheck --check-prefix=INVALID-EH-RELOCS %s
 # INVALID-EH-RELOCS: multiple relocation sections to one section are not supported
diff --git a/lld/test/ELF/invalid/section-index.test b/lld/test/ELF/invalid/section-index.test
new file mode 100644 (file)
index 0000000..80d89ef
--- /dev/null
@@ -0,0 +1,16 @@
+## If an object contains a symbol with a broken (too large) st_shndx,
+## check we report it.
+
+# RUN: yaml2obj %s -o %t1.o
+# RUN: not ld.lld %t1.o -o %t 2>&1 | FileCheck %s
+# CHECK: {{.*}}1.o: invalid section index: 256
+
+!ELF
+FileHeader:
+  Class:    ELFCLASS32
+  Data:     ELFDATA2LSB
+  Type:     ET_REL
+  Machine:  EM_386
+Symbols:
+  - Name:   foo
+    Index:  0x100