summaryrefslogtreecommitdiff
path: root/lld/test/ELF/invalid/data-encoding.test
blob: 361d53da1a862cc9ed2093c8eb909855ac3761c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# REQUIRES: x86
# This test intentionally checks for fatal errors, and fatal errors aren't supported for testing when main is run twice.
# XFAIL: main-run-twice

# The object in the archive has invalid data encoding.
# Check we report this.

# RUN: yaml2obj %s -o %t.o
# RUN: llvm-ar rcS %t.a %t.o

# RUN: not ld.lld --whole-archive %t.a -o /dev/null 2>&1 | FileCheck %s
# CHECK: {{.*}}.a({{.*}}.o): corrupted ELF file: invalid data encoding

--- !ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATANONE
  Type:            ET_REL
  Machine:         EM_X86_64