## Test that llvm-readobj/llvm-readelf shows proper relocation type
## names and values for mips target.
# RUN: yaml2obj %s -o %t-mips.o
# RUN: llvm-readobj -r --expand-relocs %t-mips.o | FileCheck %s
# CHECK: Type: R_MIPS_NONE (0)
# CHECK: Type: R_MIPS_16 (1)
# CHECK: Type: R_MIPS_32 (2)
# CHECK: Type: R_MIPS_REL32 (3)
# CHECK: Type: R_MIPS_26 (4)
# CHECK: Type: R_MIPS_HI16 (5)
# CHECK: Type: R_MIPS_LO16 (6)
# CHECK: Type: R_MIPS_GPREL16 (7)
# CHECK: Type: R_MIPS_LITERAL (8)
# CHECK: Type: R_MIPS_GOT16 (9)
# CHECK: Type: R_MIPS_PC16 (10)
# CHECK: Type: R_MIPS_CALL16 (11)
# CHECK: Type: R_MIPS_GPREL32 (12)
# CHECK: Type: R_MIPS_SHIFT5 (16)
# CHECK: Type: R_MIPS_SHIFT6 (17)
# CHECK: Type: R_MIPS_64 (18)
# CHECK: Type: R_MIPS_GOT_DISP (19)
# CHECK: Type: R_MIPS_GOT_PAGE (20)
# CHECK: Type: R_MIPS_GOT_OFST (21)
# CHECK: Type: R_MIPS_GOT_HI16 (22)
# CHECK: Type: R_MIPS_GOT_LO16 (23)
# CHECK: Type: R_MIPS_SUB (24)
# CHECK: Type: R_MIPS_INSERT_A (25)
# CHECK: Type: R_MIPS_INSERT_B (26)
# CHECK: Type: R_MIPS_DELETE (27)
# CHECK: Type: R_MIPS_HIGHER (28)
# CHECK: Type: R_MIPS_HIGHEST (29)
# CHECK: Type: R_MIPS_CALL_HI16 (30)
# CHECK: Type: R_MIPS_CALL_LO16 (31)
# CHECK: Type: R_MIPS_SCN_DISP (32)
# CHECK: Type: R_MIPS_REL16 (33)
# CHECK: Type: R_MIPS_ADD_IMMEDIATE (34)
# CHECK: Type: R_MIPS_PJUMP (35)
# CHECK: Type: R_MIPS_RELGOT (36)
# CHECK: Type: R_MIPS_JALR (37)
# CHECK: Type: R_MIPS_TLS_DTPMOD32 (38)
# CHECK: Type: R_MIPS_TLS_DTPREL32 (39)
# CHECK: Type: R_MIPS_TLS_DTPMOD64 (40)
# CHECK: Type: R_MIPS_TLS_DTPREL64 (41)
# CHECK: Type: R_MIPS_TLS_GD (42)
# CHECK: Type: R_MIPS_TLS_LDM (43)
# CHECK: Type: R_MIPS_TLS_DTPREL_HI16 (44)
# CHECK: Type: R_MIPS_TLS_DTPREL_LO16 (45)
# CHECK: Type: R_MIPS_TLS_GOTTPREL (46)
# CHECK: Type: R_MIPS_TLS_TPREL32 (47)
# CHECK: Type: R_MIPS_TLS_TPREL64 (48)
# CHECK: Type: R_MIPS_TLS_TPREL_HI16 (49)
# CHECK: Type: R_MIPS_TLS_TPREL_LO16 (50)
# CHECK: Type: R_MIPS_GLOB_DAT (51)
# CHECK: Type: R_MIPS_COPY (126)
# CHECK: Type: R_MIPS_JUMP_SLOT (127)
# CHECK: Type: R_MIPS_NUM (218)
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2MSB
Type: ET_REL
Machine: EM_MIPS
Sections:
- Name: .rel.text
Type: SHT_REL
Relocations:
- Type: R_MIPS_NONE
- Type: R_MIPS_16
- Type: R_MIPS_32
- Type: R_MIPS_REL32
- Type: R_MIPS_26
- Type: R_MIPS_HI16
- Type: R_MIPS_LO16
- Type: R_MIPS_GPREL16
- Type: R_MIPS_LITERAL
- Type: R_MIPS_GOT16
- Type: R_MIPS_PC16
- Type: R_MIPS_CALL16
- Type: R_MIPS_GPREL32
- Type: R_MIPS_SHIFT5
- Type: R_MIPS_SHIFT6
- Type: R_MIPS_64
- Type: R_MIPS_GOT_DISP
- Type: R_MIPS_GOT_PAGE
- Type: R_MIPS_GOT_OFST
- Type: R_MIPS_GOT_HI16
- Type: R_MIPS_GOT_LO16
- Type: R_MIPS_SUB
- Type: R_MIPS_INSERT_A
- Type: R_MIPS_INSERT_B
- Type: R_MIPS_DELETE
- Type: R_MIPS_HIGHER
- Type: R_MIPS_HIGHEST
- Type: R_MIPS_CALL_HI16
- Type: R_MIPS_CALL_LO16
- Type: R_MIPS_SCN_DISP
- Type: R_MIPS_REL16
- Type: R_MIPS_ADD_IMMEDIATE
- Type: R_MIPS_PJUMP
- Type: R_MIPS_RELGOT
- Type: R_MIPS_JALR
- Type: R_MIPS_TLS_DTPMOD32
- Type: R_MIPS_TLS_DTPREL32
- Type: R_MIPS_TLS_DTPMOD64
- Type: R_MIPS_TLS_DTPREL64
- Type: R_MIPS_TLS_GD
- Type: R_MIPS_TLS_LDM
- Type: R_MIPS_TLS_DTPREL_HI16
- Type: R_MIPS_TLS_DTPREL_LO16
- Type: R_MIPS_TLS_GOTTPREL
- Type: R_MIPS_TLS_TPREL32
- Type: R_MIPS_TLS_TPREL64
- Type: R_MIPS_TLS_TPREL_HI16
- Type: R_MIPS_TLS_TPREL_LO16
- Type: R_MIPS_GLOB_DAT
- Type: R_MIPS_COPY
- Type: R_MIPS_JUMP_SLOT
- Type: R_MIPS_NUM