Recommit r371023 "[lib/ObjectYAML] - Stop calling error(1) when mapping the st_other...
[llvm-complete.git] / test / tools / yaml2obj / invalid-symboless-relocation.yaml
blob716778e16f835723512baf3f02316ae134acd2cf
1 # This test succeeds but produces an invalid relocation. This test
2 # documents this behavoir.
3 # RUN: yaml2obj %s > %t
4 # RUN: llvm-readobj -r %t | FileCheck %s
6 !ELF
7 FileHeader:
8   Class:           ELFCLASS64
9   Data:            ELFDATA2LSB
10   Type:            ET_EXEC
11   Machine:         EM_X86_64
12 Sections:
13   - Name:            .text
14     Type:            SHT_PROGBITS
15     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
16     Content:         "00000000"
17   - Name:            .rel.text
18     Type:            SHT_REL
19     Link:            .symtab
20     Info:            .text
21     Relocations:
22       - Offset: 0x1000
23         Type:   R_X86_64_PC32
25 #CHECK:     Relocations [
26 #CHECK-NEXT:  Section (2) .rel.text {
27 #CHECK-NEXT:    0x1000 R_X86_64_PC32 - 0x0
28 #CHECK-NEXT:  }
29 #CHECK-NEXT:]