llvm-project/lld/test/ELF/invalid/data-encoding.test
Fangrui Song 2f09bd2fc2 [ELF,test] Improve error/warning message checks
Update tests to include proper `error:` or `warning:` prefixes and
file/section information in CHECK patterns. Add
--implicit-check-not=error: to ensure no unexpected errors are produced.
2026-02-01 11:25:22 -08:00

20 lines
587 B
Plaintext

# 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: error: {{.*}}.a({{.*}}.o): corrupted ELF file: invalid data encoding
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATANONE
Type: ET_REL
Machine: EM_X86_64