Home | History | Annotate | Download | only in Mips
      1 # RUN: yaml2obj -format=elf -docnum=1 %s > %t.o32
      2 # RUN: llvm-readobj -file-headers %t.o32 | FileCheck -check-prefix=O32OBJ %s
      3 # RUN: obj2yaml %t.o32 | FileCheck -check-prefix=O32YAML %s
      4 
      5 # O32OBJ:      Flags [ (0x50001002)
      6 # O32OBJ-NEXT:   EF_MIPS_ABI_O32 (0x1000)
      7 # O32OBJ-NEXT:   EF_MIPS_ARCH_32 (0x50000000)
      8 # O32OBJ-NEXT:   EF_MIPS_PIC (0x2)
      9 # O32OBJ-NEXT: ]
     10 
     11 # O32YAML:  Flags:  [ EF_MIPS_PIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
     12 
     13 # RUN: yaml2obj -format=elf -docnum=2 %s > %t.o64
     14 # RUN: llvm-readobj -file-headers %t.o64 | FileCheck -check-prefix=O64OBJ %s
     15 # RUN: obj2yaml %t.o64 | FileCheck -check-prefix=O64YAML %s
     16 
     17 # O64OBJ:      Flags [ (0x60002002)
     18 # O64OBJ-NEXT:   EF_MIPS_ABI_O64 (0x2000)
     19 # O64OBJ-NEXT:   EF_MIPS_ARCH_64 (0x60000000)
     20 # O64OBJ-NEXT:   EF_MIPS_PIC (0x2)
     21 # O64OBJ-NEXT: ]
     22 
     23 # O64YAML:  Flags:  [ EF_MIPS_PIC, EF_MIPS_ABI_O64, EF_MIPS_ARCH_64 ]
     24 
     25 # RUN: yaml2obj -format=elf -docnum=3 %s > %t.eabi32
     26 # RUN: llvm-readobj -file-headers %t.eabi32 | FileCheck -check-prefix=E32OBJ %s
     27 # RUN: obj2yaml %t.eabi32 | FileCheck -check-prefix=E32YAML %s
     28 
     29 # E32OBJ:      Flags [ (0x50003002)
     30 # E32OBJ-NEXT:   EF_MIPS_ABI_EABI32 (0x3000)
     31 # E32OBJ-NEXT:   EF_MIPS_ARCH_32 (0x50000000)
     32 # E32OBJ-NEXT:   EF_MIPS_PIC (0x2)
     33 # E32OBJ-NEXT: ]
     34 
     35 # E32YAML:  Flags:  [ EF_MIPS_PIC, EF_MIPS_ABI_EABI32, EF_MIPS_ARCH_32 ]
     36 
     37 # RUN: yaml2obj -format=elf -docnum=4 %s > %t.eabi64
     38 # RUN: llvm-readobj -file-headers %t.eabi64 | FileCheck -check-prefix=E64OBJ %s
     39 # RUN: obj2yaml %t.eabi64 | FileCheck -check-prefix=E64YAML %s
     40 
     41 # E64OBJ:      Flags [ (0x60004002)
     42 # E64OBJ-NEXT:   EF_MIPS_ABI_EABI64 (0x4000)
     43 # E64OBJ-NEXT:   EF_MIPS_ARCH_64 (0x60000000)
     44 # E64OBJ-NEXT:   EF_MIPS_PIC (0x2)
     45 # E64OBJ-NEXT: ]
     46 
     47 # E64YAML:  Flags:  [ EF_MIPS_PIC, EF_MIPS_ABI_EABI64, EF_MIPS_ARCH_64 ]
     48 
     49 # o32
     50 ---
     51 FileHeader:
     52   Class:           ELFCLASS32
     53   Data:            ELFDATA2LSB
     54   Type:            ET_REL
     55   Machine:         EM_MIPS
     56   Flags:           [ EF_MIPS_PIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ]
     57 Sections:
     58   - Name:            .text
     59     Type:            SHT_PROGBITS
     60     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     61     AddressAlign:    16
     62     Size:            4
     63 
     64 Symbols:
     65   Global:
     66     - Name:    T1
     67       Section: .text
     68       Value:   0
     69       Size:    4
     70 
     71 # o64
     72 ---
     73 FileHeader:
     74   Class:           ELFCLASS64
     75   Data:            ELFDATA2LSB
     76   Type:            ET_REL
     77   Machine:         EM_MIPS
     78   Flags:           [ EF_MIPS_PIC, EF_MIPS_ABI_O64, EF_MIPS_ARCH_64 ]
     79 Sections:
     80   - Name:            .text
     81     Type:            SHT_PROGBITS
     82     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     83     AddressAlign:    16
     84     Size:            4
     85 
     86 Symbols:
     87   Global:
     88     - Name:    T1
     89       Section: .text
     90       Value:   0
     91       Size:    4
     92 
     93 # eabio32
     94 ---
     95 FileHeader:
     96   Class:           ELFCLASS32
     97   Data:            ELFDATA2LSB
     98   Type:            ET_REL
     99   Machine:         EM_MIPS
    100   Flags:           [ EF_MIPS_PIC, EF_MIPS_ABI_EABI32, EF_MIPS_ARCH_32 ]
    101 Sections:
    102   - Name:            .text
    103     Type:            SHT_PROGBITS
    104     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    105     AddressAlign:    16
    106     Size:            4
    107 
    108 Symbols:
    109   Global:
    110     - Name:    T1
    111       Section: .text
    112       Value:   0
    113       Size:    4
    114 
    115 # eabi64
    116 ---
    117 FileHeader:
    118   Class:           ELFCLASS64
    119   Data:            ELFDATA2LSB
    120   Type:            ET_REL
    121   Machine:         EM_MIPS
    122   Flags:           [ EF_MIPS_PIC, EF_MIPS_ABI_EABI64, EF_MIPS_ARCH_64 ]
    123 Sections:
    124   - Name:            .text
    125     Type:            SHT_PROGBITS
    126     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    127     AddressAlign:    16
    128     Size:            4
    129 
    130 Symbols:
    131   Global:
    132     - Name:    T1
    133       Section: .text
    134       Value:   0
    135       Size:    4
    136 ...
    137