[lld] r358889 - [LLD][ELF] - Remove a binary from the inputs. NFCI.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 07:53:32 PDT 2019


Author: grimar
Date: Mon Apr 22 07:53:32 2019
New Revision: 358889

URL: http://llvm.org/viewvc/llvm-project?rev=358889&view=rev
Log:
[LLD][ELF] - Remove a binary from the inputs. NFCI.

section-index.elf was removed and the corresponding test
was replaced with a yaml2obj based test.

Added:
    lld/trunk/test/ELF/invalid/section-index.test
Removed:
    lld/trunk/test/ELF/invalid/Inputs/section-index.elf
Modified:
    lld/trunk/test/ELF/invalid/invalid-elf.test

Removed: lld/trunk/test/ELF/invalid/Inputs/section-index.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/Inputs/section-index.elf?rev=358888&view=auto
==============================================================================
Binary file - no diff available.

Modified: lld/trunk/test/ELF/invalid/invalid-elf.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/invalid-elf.test?rev=358889&r1=358888&r2=358889&view=diff
==============================================================================
--- lld/trunk/test/ELF/invalid/invalid-elf.test (original)
+++ lld/trunk/test/ELF/invalid/invalid-elf.test Mon Apr 22 07:53:32 2019
@@ -16,10 +16,6 @@
 # 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

Added: lld/trunk/test/ELF/invalid/section-index.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/section-index.test?rev=358889&view=auto
==============================================================================
--- lld/trunk/test/ELF/invalid/section-index.test (added)
+++ lld/trunk/test/ELF/invalid/section-index.test Mon Apr 22 07:53:32 2019
@@ -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




More information about the llvm-commits mailing list