From 81ffc08a8ad589a3a8c52ebf1b4a92187fb056e4 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Mon, 22 Apr 2019 14:53:32 +0000 Subject: [PATCH] [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. llvm-svn: 358889 --- lld/test/ELF/invalid/Inputs/section-index.elf | Bin 544 -> 0 bytes lld/test/ELF/invalid/invalid-elf.test | 4 ---- lld/test/ELF/invalid/section-index.test | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) delete mode 100644 lld/test/ELF/invalid/Inputs/section-index.elf create mode 100644 lld/test/ELF/invalid/section-index.test diff --git a/lld/test/ELF/invalid/Inputs/section-index.elf b/lld/test/ELF/invalid/Inputs/section-index.elf deleted file mode 100644 index ec5adcf3b0b8c92f703bc81e5fdb9181dbae5774..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmb<-^>JfjWMpQ50!9Wq21XbMiC%!jb^x;-7}&6?geYVOQUX8~7(lNiwW5R}zPKc@ zsDwc;skoRyuehYBBryp{SLTB0l*E!m41Ht@2m|%OJ%?mQ0hFzYBnD!l`yIpwVRWB3 z0L8EY7BoR+ARnY3-3<R?=S{d_&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 index 0000000..80d89ef --- /dev/null +++ b/lld/test/ELF/invalid/section-index.test @@ -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 -- 2.7.4