summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/obj2yaml/relocation-unsupported-machine.yaml
blob: 84e5c13b53d66acd065ae0503771a35b837c3fe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Show that obj2yaml is able to dump relocations when `e_machine` is unknown.

# RUN: yaml2obj %s -o %t1
# RUN: obj2yaml %t1 | FileCheck %s

# CHECK:      --- !ELF
# CHECK-NEXT: FileHeader:
# CHECK-NEXT:   Class:   ELFCLASS64
# CHECK-NEXT:   Data:    ELFDATA2MSB
# CHECK-NEXT:   Type:    ET_REL
# CHECK-NEXT:   Machine: 0x1234
# CHECK-NEXT: Sections:
# CHECK-NEXT:   - Name:    .rela.text
# CHECK-NEXT:     Type:    SHT_RELA
# CHECK-NEXT:     EntSize: 0x0000000000000018
# CHECK-NEXT:     Relocations:
# CHECK-NEXT:       - Offset: 0x0000000000000001
# CHECK-NEXT:         Type:   0x00000002
# CHECK-NEXT:       - Offset: 0x0000000000000003
# CHECK-NEXT:         Type:   0x00000004

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2MSB
  Type:    ET_REL
  Machine: 0x1234
Sections:
  - Name: .rela.text
    Type: SHT_RELA
    Relocations:
      - Offset: 0x1
        Type:   0x2
      - Offset: 0x3
        Type:   0x4
OpenPOWER on IntegriCloud