Compiler projects using llvm
## Test that llvm-readobj shows proper relocation type
## names and values for ppc64 target.

# RUN: yaml2obj %s -o %t-ppc64.o
# RUN: llvm-readobj -r --expand-relocs %t-ppc64.o | FileCheck %s

# CHECK: Type: R_PPC64_NONE (0)
# CHECK: Type: R_PPC64_ADDR32 (1)
# CHECK: Type: R_PPC64_ADDR24 (2)
# CHECK: Type: R_PPC64_ADDR16 (3)
# CHECK: Type: R_PPC64_ADDR16_LO (4)
# CHECK: Type: R_PPC64_ADDR16_HI (5)
# CHECK: Type: R_PPC64_ADDR16_HA (6)
# CHECK: Type: R_PPC64_ADDR14 (7)
# CHECK: Type: R_PPC64_ADDR14_BRTAKEN (8)
# CHECK: Type: R_PPC64_ADDR14_BRNTAKEN (9)
# CHECK: Type: R_PPC64_REL24 (10)
# CHECK: Type: R_PPC64_REL14 (11)
# CHECK: Type: R_PPC64_REL14_BRTAKEN (12)
# CHECK: Type: R_PPC64_REL14_BRNTAKEN (13)
# CHECK: Type: R_PPC64_GOT16 (14)
# CHECK: Type: R_PPC64_GOT16_LO (15)
# CHECK: Type: R_PPC64_GOT16_HI (16)
# CHECK: Type: R_PPC64_GOT16_HA (17)
# CHECK: Type: R_PPC64_COPY (19)
# CHECK: Type: R_PPC64_GLOB_DAT (20)
# CHECK: Type: R_PPC64_JMP_SLOT (21)
# CHECK: Type: R_PPC64_RELATIVE (22)
# CHECK: Type: R_PPC64_REL32 (26)
# CHECK: Type: R_PPC64_ADDR64 (38)
# CHECK: Type: R_PPC64_ADDR16_HIGHER (39)
# CHECK: Type: R_PPC64_ADDR16_HIGHERA (40)
# CHECK: Type: R_PPC64_ADDR16_HIGHEST (41)
# CHECK: Type: R_PPC64_ADDR16_HIGHESTA (42)
# CHECK: Type: R_PPC64_REL64 (44)
# CHECK: Type: R_PPC64_TOC16 (47)
# CHECK: Type: R_PPC64_TOC16_LO (48)
# CHECK: Type: R_PPC64_TOC16_HI (49)
# CHECK: Type: R_PPC64_TOC16_HA (50)
# CHECK: Type: R_PPC64_TOC (51)
# CHECK: Type: R_PPC64_ADDR16_DS (56)
# CHECK: Type: R_PPC64_ADDR16_LO_DS (57)
# CHECK: Type: R_PPC64_GOT16_DS (58)
# CHECK: Type: R_PPC64_GOT16_LO_DS (59)
# CHECK: Type: R_PPC64_TOC16_DS (63)
# CHECK: Type: R_PPC64_TOC16_LO_DS (64)
# CHECK: Type: R_PPC64_TLS (67)
# CHECK: Type: R_PPC64_DTPMOD64 (68)
# CHECK: Type: R_PPC64_TPREL16 (69)
# CHECK: Type: R_PPC64_TPREL16_LO (70)
# CHECK: Type: R_PPC64_TPREL16_HI (71)
# CHECK: Type: R_PPC64_TPREL16_HA (72)
# CHECK: Type: R_PPC64_TPREL64 (73)
# CHECK: Type: R_PPC64_DTPREL16 (74)
# CHECK: Type: R_PPC64_DTPREL16_LO (75)
# CHECK: Type: R_PPC64_DTPREL16_HI (76)
# CHECK: Type: R_PPC64_DTPREL16_HA (77)
# CHECK: Type: R_PPC64_DTPREL64 (78)
# CHECK: Type: R_PPC64_GOT_TLSGD16 (79)
# CHECK: Type: R_PPC64_GOT_TLSGD16_LO (80)
# CHECK: Type: R_PPC64_GOT_TLSGD16_HI (81)
# CHECK: Type: R_PPC64_GOT_TLSGD16_HA (82)
# CHECK: Type: R_PPC64_GOT_TLSLD16 (83)
# CHECK: Type: R_PPC64_GOT_TLSLD16_LO (84)
# CHECK: Type: R_PPC64_GOT_TLSLD16_HI (85)
# CHECK: Type: R_PPC64_GOT_TLSLD16_HA (86)
# CHECK: Type: R_PPC64_GOT_TPREL16_DS (87)
# CHECK: Type: R_PPC64_GOT_TPREL16_LO_DS (88)
# CHECK: Type: R_PPC64_GOT_TPREL16_HI (89)
# CHECK: Type: R_PPC64_GOT_TPREL16_HA (90)
# CHECK: Type: R_PPC64_GOT_DTPREL16_DS (91)
# CHECK: Type: R_PPC64_GOT_DTPREL16_LO_DS (92)
# CHECK: Type: R_PPC64_GOT_DTPREL16_HI (93)
# CHECK: Type: R_PPC64_GOT_DTPREL16_HA (94)
# CHECK: Type: R_PPC64_TPREL16_DS (95)
# CHECK: Type: R_PPC64_TPREL16_LO_DS (96)
# CHECK: Type: R_PPC64_TPREL16_HIGHER (97)
# CHECK: Type: R_PPC64_TPREL16_HIGHERA (98)
# CHECK: Type: R_PPC64_TPREL16_HIGHEST (99)
# CHECK: Type: R_PPC64_TPREL16_HIGHESTA (100)
# CHECK: Type: R_PPC64_DTPREL16_DS (101)
# CHECK: Type: R_PPC64_DTPREL16_LO_DS (102)
# CHECK: Type: R_PPC64_DTPREL16_HIGHER (103)
# CHECK: Type: R_PPC64_DTPREL16_HIGHERA (104)
# CHECK: Type: R_PPC64_DTPREL16_HIGHEST (105)
# CHECK: Type: R_PPC64_DTPREL16_HIGHESTA (106)
# CHECK: Type: R_PPC64_TLSGD (107)
# CHECK: Type: R_PPC64_TLSLD (108)
# CHECK: Type: R_PPC64_ADDR16_HIGH (110)
# CHECK: Type: R_PPC64_ADDR16_HIGHA (111)
# CHECK: Type: R_PPC64_TPREL16_HIGH (112)
# CHECK: Type: R_PPC64_TPREL16_HIGHA (113)
# CHECK: Type: R_PPC64_DTPREL16_HIGH (114)
# CHECK: Type: R_PPC64_DTPREL16_HIGHA (115)
# CHECK: Type: R_PPC64_IRELATIVE (248)
# CHECK: Type: R_PPC64_REL16 (249)
# CHECK: Type: R_PPC64_REL16_LO (250)
# CHECK: Type: R_PPC64_REL16_HI (251)
# CHECK: Type: R_PPC64_REL16_HA (252)

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2MSB
  Type:    ET_REL
  Machine: EM_PPC64
Sections:
  - Name: .rela.text
    Type: SHT_RELA
    Relocations:
      - Type: R_PPC64_NONE
      - Type: R_PPC64_ADDR32
      - Type: R_PPC64_ADDR24
      - Type: R_PPC64_ADDR16
      - Type: R_PPC64_ADDR16_LO
      - Type: R_PPC64_ADDR16_HI
      - Type: R_PPC64_ADDR16_HA
      - Type: R_PPC64_ADDR14
      - Type: R_PPC64_ADDR14_BRTAKEN
      - Type: R_PPC64_ADDR14_BRNTAKEN
      - Type: R_PPC64_REL24
      - Type: R_PPC64_REL14
      - Type: R_PPC64_REL14_BRTAKEN
      - Type: R_PPC64_REL14_BRNTAKEN
      - Type: R_PPC64_GOT16
      - Type: R_PPC64_GOT16_LO
      - Type: R_PPC64_GOT16_HI
      - Type: R_PPC64_GOT16_HA
      - Type: R_PPC64_COPY
      - Type: R_PPC64_GLOB_DAT
      - Type: R_PPC64_JMP_SLOT
      - Type: R_PPC64_RELATIVE
      - Type: R_PPC64_REL32
      - Type: R_PPC64_ADDR64
      - Type: R_PPC64_ADDR16_HIGHER
      - Type: R_PPC64_ADDR16_HIGHERA
      - Type: R_PPC64_ADDR16_HIGHEST
      - Type: R_PPC64_ADDR16_HIGHESTA
      - Type: R_PPC64_REL64
      - Type: R_PPC64_TOC16
      - Type: R_PPC64_TOC16_LO
      - Type: R_PPC64_TOC16_HI
      - Type: R_PPC64_TOC16_HA
      - Type: R_PPC64_TOC
      - Type: R_PPC64_ADDR16_DS
      - Type: R_PPC64_ADDR16_LO_DS
      - Type: R_PPC64_GOT16_DS
      - Type: R_PPC64_GOT16_LO_DS
      - Type: R_PPC64_TOC16_DS
      - Type: R_PPC64_TOC16_LO_DS
      - Type: R_PPC64_TLS
      - Type: R_PPC64_DTPMOD64
      - Type: R_PPC64_TPREL16
      - Type: R_PPC64_TPREL16_LO
      - Type: R_PPC64_TPREL16_HI
      - Type: R_PPC64_TPREL16_HA
      - Type: R_PPC64_TPREL64
      - Type: R_PPC64_DTPREL16
      - Type: R_PPC64_DTPREL16_LO
      - Type: R_PPC64_DTPREL16_HI
      - Type: R_PPC64_DTPREL16_HA
      - Type: R_PPC64_DTPREL64
      - Type: R_PPC64_GOT_TLSGD16
      - Type: R_PPC64_GOT_TLSGD16_LO
      - Type: R_PPC64_GOT_TLSGD16_HI
      - Type: R_PPC64_GOT_TLSGD16_HA
      - Type: R_PPC64_GOT_TLSLD16
      - Type: R_PPC64_GOT_TLSLD16_LO
      - Type: R_PPC64_GOT_TLSLD16_HI
      - Type: R_PPC64_GOT_TLSLD16_HA
      - Type: R_PPC64_GOT_TPREL16_DS
      - Type: R_PPC64_GOT_TPREL16_LO_DS
      - Type: R_PPC64_GOT_TPREL16_HI
      - Type: R_PPC64_GOT_TPREL16_HA
      - Type: R_PPC64_GOT_DTPREL16_DS
      - Type: R_PPC64_GOT_DTPREL16_LO_DS
      - Type: R_PPC64_GOT_DTPREL16_HI
      - Type: R_PPC64_GOT_DTPREL16_HA
      - Type: R_PPC64_TPREL16_DS
      - Type: R_PPC64_TPREL16_LO_DS
      - Type: R_PPC64_TPREL16_HIGHER
      - Type: R_PPC64_TPREL16_HIGHERA
      - Type: R_PPC64_TPREL16_HIGHEST
      - Type: R_PPC64_TPREL16_HIGHESTA
      - Type: R_PPC64_DTPREL16_DS
      - Type: R_PPC64_DTPREL16_LO_DS
      - Type: R_PPC64_DTPREL16_HIGHER
      - Type: R_PPC64_DTPREL16_HIGHERA
      - Type: R_PPC64_DTPREL16_HIGHEST
      - Type: R_PPC64_DTPREL16_HIGHESTA
      - Type: R_PPC64_TLSGD
      - Type: R_PPC64_TLSLD
      - Type: R_PPC64_ADDR16_HIGH
      - Type: R_PPC64_ADDR16_HIGHA
      - Type: R_PPC64_TPREL16_HIGH
      - Type: R_PPC64_TPREL16_HIGHA
      - Type: R_PPC64_DTPREL16_HIGH
      - Type: R_PPC64_DTPREL16_HIGHA
      - Type: R_PPC64_IRELATIVE
      - Type: R_PPC64_REL16
      - Type: R_PPC64_REL16_LO
      - Type: R_PPC64_REL16_HI
      - Type: R_PPC64_REL16_HA