invalid-attr-section-size.test 616 Bytes
## This test case is used to ensure the error code is caught by llvm-readobj.

# RUN: yaml2obj %s -D BITS=32 -o %t.32.o
# RUN: llvm-readobj -A %t.32.o 2>&1 | FileCheck -DFILE=%t %s
# RUN: yaml2obj %s -D BITS=64 -o %t.64.o
# RUN: llvm-readobj -A %t.64.o 2>&1 | FileCheck -DFILE=%t %s

# CHECK: warning: '[[FILE]].{{32|64}}.o': invalid section length 0 at offset 0x1

--- !ELF
FileHeader:
  Class:   ELFCLASS[[BITS]]
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_RISCV
Sections:
  - Name:    .riscv.attributes
    Type:    SHT_RISCV_ATTRIBUTES
## Version: 'A'(0x41), section length: 0
    Content: 4100000000