xref: /llvm-project/lld/test/ELF/invalid/section-index.test (revision f21c35d54f8f7af9d0c64b566cabbc4f796a54df)
1## If an object contains a symbol with a broken (too large) st_shndx,
2## check we report it.
3
4# RUN: yaml2obj %s -o %t1.o
5# RUN: not ld.lld %t1.o -o /dev/null 2>&1 | FileCheck %s
6# RUN: ld.lld %t1.o -o /dev/null --noinhibit-exec 2>&1 | FileCheck %s
7# CHECK: {{.*}}1.o: invalid section index: 256
8
9!ELF
10FileHeader:
11  Class:    ELFCLASS32
12  Data:     ELFDATA2LSB
13  Type:     ET_REL
14  Machine:  EM_386
15Symbols:
16  - Name:   foo
17    Index:  0x100
18