llvm.org GIT mirror llvm / 785cf2e test / tools / llvm-readobj / reloc-types-elf-mips.test
785cf2e

Tree @785cf2e (Download .tar.gz)

reloc-types-elf-mips.test @785cf2eraw · history · blame

## 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
  OSABI:   ELFOSABI_GNU
  Type:    ET_REL
  Machine: EM_MIPS
Sections:
  - Name:    .text
    Type:    SHT_PROGBITS
    Content: 00
  - Name:         .rel.text
    Type:         SHT_REL
    Link:         .symtab
    AddressAlign: 0x0000000000000004
    EntSize:      0x0000000000000008
    Info:         .text
    Relocations:
      - Offset: 0x0000000000000000
        Type:   R_MIPS_NONE
      - Offset: 0x0000000000000004
        Type:   R_MIPS_16
      - Offset: 0x0000000000000008
        Type:   R_MIPS_32
      - Offset: 0x000000000000000C
        Type:   R_MIPS_REL32
      - Offset: 0x0000000000000010
        Type:   R_MIPS_26
      - Offset: 0x0000000000000014
        Type:   R_MIPS_HI16
      - Offset: 0x0000000000000018
        Type:   R_MIPS_LO16
      - Offset: 0x000000000000001C
        Type:   R_MIPS_GPREL16
      - Offset: 0x0000000000000020
        Type:   R_MIPS_LITERAL
      - Offset: 0x0000000000000024
        Type:   R_MIPS_GOT16
      - Offset: 0x0000000000000028
        Type:   R_MIPS_PC16
      - Offset: 0x000000000000002C
        Type:   R_MIPS_CALL16
      - Offset: 0x0000000000000030
        Type:   R_MIPS_GPREL32
      - Offset: 0x0000000000000034
        Type:   R_MIPS_SHIFT5
      - Offset: 0x0000000000000038
        Type:   R_MIPS_SHIFT6
      - Offset: 0x000000000000003C
        Type:   R_MIPS_64
      - Offset: 0x0000000000000040
        Type:   R_MIPS_GOT_DISP
      - Offset: 0x0000000000000044
        Type:   R_MIPS_GOT_PAGE
      - Offset: 0x0000000000000048
        Type:   R_MIPS_GOT_OFST
      - Offset: 0x000000000000004C
        Type:   R_MIPS_GOT_HI16
      - Offset: 0x0000000000000050
        Type:   R_MIPS_GOT_LO16
      - Offset: 0x0000000000000054
        Type:   R_MIPS_SUB
      - Offset: 0x0000000000000058
        Type:   R_MIPS_INSERT_A
      - Offset: 0x000000000000005C
        Type:   R_MIPS_INSERT_B
      - Offset: 0x0000000000000060
        Type:   R_MIPS_DELETE
      - Offset: 0x0000000000000064
        Type:   R_MIPS_HIGHER
      - Offset: 0x0000000000000068
        Type:   R_MIPS_HIGHEST
      - Offset: 0x000000000000006C
        Type:   R_MIPS_CALL_HI16
      - Offset: 0x0000000000000070
        Type:   R_MIPS_CALL_LO16
      - Offset: 0x0000000000000074
        Type:   R_MIPS_SCN_DISP
      - Offset: 0x0000000000000078
        Type:   R_MIPS_REL16
      - Offset: 0x000000000000007C
        Type:   R_MIPS_ADD_IMMEDIATE
      - Offset: 0x0000000000000080
        Type:   R_MIPS_PJUMP
      - Offset: 0x0000000000000084
        Type:   R_MIPS_RELGOT
      - Offset: 0x0000000000000088
        Type:   R_MIPS_JALR
      - Offset: 0x000000000000008C
        Type:   R_MIPS_TLS_DTPMOD32
      - Offset: 0x0000000000000090
        Type:   R_MIPS_TLS_DTPREL32
      - Offset: 0x0000000000000094
        Type:   R_MIPS_TLS_DTPMOD64
      - Offset: 0x0000000000000098
        Type:   R_MIPS_TLS_DTPREL64
      - Offset: 0x000000000000009C
        Type:   R_MIPS_TLS_GD
      - Offset: 0x00000000000000A0
        Type:   R_MIPS_TLS_LDM
      - Offset: 0x00000000000000A4
        Type:   R_MIPS_TLS_DTPREL_HI16
      - Offset: 0x00000000000000A8
        Type:   R_MIPS_TLS_DTPREL_LO16
      - Offset: 0x00000000000000AC
        Type:   R_MIPS_TLS_GOTTPREL
      - Offset: 0x00000000000000B0
        Type:   R_MIPS_TLS_TPREL32
      - Offset: 0x00000000000000B4
        Type:   R_MIPS_TLS_TPREL64
      - Offset: 0x00000000000000B8
        Type:   R_MIPS_TLS_TPREL_HI16
      - Offset: 0x00000000000000BC
        Type:   R_MIPS_TLS_TPREL_LO16
      - Offset: 0x00000000000000C0
        Type:   R_MIPS_GLOB_DAT
      - Offset: 0x00000000000000C4
        Type:   R_MIPS_COPY
      - Offset: 0x00000000000000C8
        Type:   R_MIPS_JUMP_SLOT
      - Offset: 0x00000000000000CC
        Type:   R_MIPS_NUM