xref: /llvm-project/llvm/test/tools/llvm-objdump/ELF/RISCV/invalid-arch-attr.test (revision 31ee6ae059fd3c2ec1ffa38fabe0850d9808eaa8)
1## Handle invalid arch attributes.
2##
3## This test cannot be assembly because the test needs an invalid arch
4## feature and `llvm-mc` will filter out the unrecognized arch feature.
5
6# RUN: yaml2obj %s -D BITS=32 -o %t.32.o
7# RUN: not llvm-objdump -d %t.32.o 2>&1 | \
8# RUN:   FileCheck %s --check-prefixes=DISASM
9
10# DISASM: {{.*}} invalid section length 35 at offset 0x1
11
12--- !ELF
13FileHeader:
14  Class:   ELFCLASS[[BITS]]
15  Data:    ELFDATA2LSB
16  Type:    ET_REL
17  Machine: EM_RISCV
18Sections:
19  - Name:    .text
20    Type:    SHT_PROGBITS
21    Flags:   [ SHF_ALLOC, SHF_EXECINSTR ]
22## The content is the encoding of "mul a0, a1, a2".
23    Content: 3385C502
24  - Name:    .riscv.attributes
25    Type:    SHT_RISCV_ATTRIBUTES
26    Content: 4123000000726973637600019572763332693270305F6D3270305F7831703000
27