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

Tree @785cf2e (Download .tar.gz)

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

## Test that llvm-readobj/llvm-readelf shows proper relocation type
## names and values for mips64 target.

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

# CHECK: Type: R_MIPS_NONE/R_MIPS_NONE/R_MIPS_NONE (0)
# CHECK: Type: R_MIPS_16/R_MIPS_16/R_MIPS_16 (65793)
# CHECK: Type: R_MIPS_32/R_MIPS_32/R_MIPS_32 (131586)
# CHECK: Type: R_MIPS_REL32/R_MIPS_REL32/R_MIPS_REL32 (197379)
# CHECK: Type: R_MIPS_26/R_MIPS_26/R_MIPS_26 (263172)
# CHECK: Type: R_MIPS_HI16/R_MIPS_HI16/R_MIPS_HI16 (328965)
# CHECK: Type: R_MIPS_LO16/R_MIPS_LO16/R_MIPS_LO16 (394758)
# CHECK: Type: R_MIPS_GPREL16/R_MIPS_GPREL16/R_MIPS_GPREL16 (460551)
# CHECK: Type: R_MIPS_LITERAL/R_MIPS_LITERAL/R_MIPS_LITERAL (526344)
# CHECK: Type: R_MIPS_GOT16/R_MIPS_GOT16/R_MIPS_GOT16 (592137)
# CHECK: Type: R_MIPS_PC16/R_MIPS_PC16/R_MIPS_PC16 (657930)
# CHECK: Type: R_MIPS_CALL16/R_MIPS_CALL16/R_MIPS_CALL16 (723723)
# CHECK: Type: R_MIPS_GPREL32/R_MIPS_GPREL32/R_MIPS_GPREL32 (789516)
# CHECK: Type: R_MIPS_SHIFT5/R_MIPS_SHIFT5/R_MIPS_SHIFT5 (1052688)
# CHECK: Type: R_MIPS_SHIFT6/R_MIPS_SHIFT6/R_MIPS_SHIFT6 (1118481)
# CHECK: Type: R_MIPS_64/R_MIPS_64/R_MIPS_64 (1184274)
# CHECK: Type: R_MIPS_GOT_DISP/R_MIPS_GOT_DISP/R_MIPS_GOT_DISP (1250067)
# CHECK: Type: R_MIPS_GOT_PAGE/R_MIPS_GOT_PAGE/R_MIPS_GOT_PAGE (1315860)
# CHECK: Type: R_MIPS_GOT_OFST/R_MIPS_GOT_OFST/R_MIPS_GOT_OFST (1381653)
# CHECK: Type: R_MIPS_GOT_HI16/R_MIPS_GOT_HI16/R_MIPS_GOT_HI16 (1447446)
# CHECK: Type: R_MIPS_GOT_LO16/R_MIPS_GOT_LO16/R_MIPS_GOT_LO16 (1513239)
# CHECK: Type: R_MIPS_SUB/R_MIPS_SUB/R_MIPS_SUB (1579032)
# CHECK: Type: R_MIPS_INSERT_A/R_MIPS_INSERT_A/R_MIPS_INSERT_A (1644825)
# CHECK: Type: R_MIPS_INSERT_B/R_MIPS_INSERT_B/R_MIPS_INSERT_B (1710618)
# CHECK: Type: R_MIPS_DELETE/R_MIPS_DELETE/R_MIPS_DELETE (1776411)
# CHECK: Type: R_MIPS_HIGHER/R_MIPS_HIGHER/R_MIPS_HIGHER (1842204)
# CHECK: Type: R_MIPS_HIGHEST/R_MIPS_HIGHEST/R_MIPS_HIGHEST (1907997)
# CHECK: Type: R_MIPS_CALL_HI16/R_MIPS_CALL_HI16/R_MIPS_CALL_HI16 (1973790)
# CHECK: Type: R_MIPS_CALL_LO16/R_MIPS_CALL_LO16/R_MIPS_CALL_LO16 (2039583)
# CHECK: Type: R_MIPS_SCN_DISP/R_MIPS_SCN_DISP/R_MIPS_SCN_DISP (2105376)
# CHECK: Type: R_MIPS_REL16/R_MIPS_REL16/R_MIPS_REL16 (2171169)
# CHECK: Type: R_MIPS_ADD_IMMEDIATE/R_MIPS_ADD_IMMEDIATE/R_MIPS_ADD_IMMEDIATE (2236962)
# CHECK: Type: R_MIPS_PJUMP/R_MIPS_PJUMP/R_MIPS_PJUMP (2302755)
# CHECK: Type: R_MIPS_RELGOT/R_MIPS_RELGOT/R_MIPS_RELGOT (2368548)
# CHECK: Type: R_MIPS_JALR/R_MIPS_JALR/R_MIPS_JALR (2434341)
# CHECK: Type: R_MIPS_TLS_DTPMOD32/R_MIPS_TLS_DTPMOD32/R_MIPS_TLS_DTPMOD32 (2500134)
# CHECK: Type: R_MIPS_TLS_DTPREL32/R_MIPS_TLS_DTPREL32/R_MIPS_TLS_DTPREL32 (2565927)
# CHECK: Type: R_MIPS_TLS_DTPMOD64/R_MIPS_TLS_DTPMOD64/R_MIPS_TLS_DTPMOD64 (2631720)
# CHECK: Type: R_MIPS_TLS_DTPREL64/R_MIPS_TLS_DTPREL64/R_MIPS_TLS_DTPREL64 (2697513)
# CHECK: Type: R_MIPS_TLS_GD/R_MIPS_TLS_GD/R_MIPS_TLS_GD (2763306)
# CHECK: Type: R_MIPS_TLS_LDM/R_MIPS_TLS_LDM/R_MIPS_TLS_LDM (2829099)
# CHECK: Type: R_MIPS_TLS_DTPREL_HI16/R_MIPS_TLS_DTPREL_HI16/R_MIPS_TLS_DTPREL_HI16 (2894892)
# CHECK: Type: R_MIPS_TLS_DTPREL_LO16/R_MIPS_TLS_DTPREL_LO16/R_MIPS_TLS_DTPREL_LO16 (2960685)
# CHECK: Type: R_MIPS_TLS_GOTTPREL/R_MIPS_TLS_GOTTPREL/R_MIPS_TLS_GOTTPREL (3026478)
# CHECK: Type: R_MIPS_TLS_TPREL32/R_MIPS_TLS_TPREL32/R_MIPS_TLS_TPREL32 (3092271)
# CHECK: Type: R_MIPS_TLS_TPREL64/R_MIPS_TLS_TPREL64/R_MIPS_TLS_TPREL64 (3158064)
# CHECK: Type: R_MIPS_TLS_TPREL_HI16/R_MIPS_TLS_TPREL_HI16/R_MIPS_TLS_TPREL_HI16 (3223857)
# CHECK: Type: R_MIPS_TLS_TPREL_LO16/R_MIPS_TLS_TPREL_LO16/R_MIPS_TLS_TPREL_LO16 (3289650)
# CHECK: Type: R_MIPS_GLOB_DAT/R_MIPS_GLOB_DAT/R_MIPS_GLOB_DAT (3355443)
# CHECK: Type: R_MIPS_COPY/R_MIPS_COPY/R_MIPS_COPY (8289918)
# CHECK: Type: R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT/R_MIPS_JUMP_SLOT (8355711)
# CHECK: Type: R_MIPS_NUM/R_MIPS_NUM/R_MIPS_NUM (14342874)

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