aboutsummaryrefslogtreecommitdiff
path: root/test/old-elf/Mips/plt-entry-mixed-4.test
blob: ba8b04866b984b5fe17ba4b31139c463f5cb80cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# REQUIRES: mips

# Conditions:
# a) Object file contains R_MIPS_26 relocation refers to the microMIPS symbol.
# Check:
# a) PLT contains a regular non-compressed entry.

# Build shared library
# RUN: yaml2obj -format=elf -docnum 1 %s > %t.so.o
# RUN: lld -flavor old-gnu -target mipsel -shared -o %t.so %t.so.o

# Build executable
# RUN: yaml2obj -format=elf -docnum 2 %s > %t.o.o
# RUN: lld -flavor old-gnu -target mipsel -e T0 -o %t.exe %t.o.o %t.so
# RUN: llvm-objdump -s %t.exe | FileCheck %s

# FIXME (simon): Check the disassembler output when llvm-objdump starts
#                to support microMIPS instruction encoding.

# CHECK: Contents of section .plt:
# CHECK-NEXT:  400170 40001c3c 0020998f 00209c27 23c01c03
# CHECK-NEXT:  400180 2578e003 82c01800 09f82003 feff1827
# CHECK-NEXT:  400190 40000f3c 0820f98d 08002003 0820f825

# so.o
---
FileHeader:
  Class:   ELFCLASS32
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_MIPS
  Flags:   [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32,
            EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]

Sections:
  - Name:         .text
    Type:         SHT_PROGBITS
    Size:         0x0C
    AddressAlign: 16
    Flags:        [SHF_EXECINSTR, SHF_ALLOC]

Symbols:
  Global:
    - Name:    T1
      Section: .text
      Type:    STT_FUNC
      Value:   0x0
      Size:    4
      Other:   [STO_MIPS_MICROMIPS]

# o.o
---
FileHeader:
  Class:   ELFCLASS32
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_MIPS
  Flags:   [EF_MIPS_CPIC, EF_MIPS_ABI_O32,
            EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]

Sections:
- Name:         .text
  Type:         SHT_PROGBITS
  Content:      "0000000C00000000"
  AddressAlign: 16
  Flags:        [SHF_EXECINSTR, SHF_ALLOC]

- Name:         .rel.text
  Type:         SHT_REL
  Info:         .text
  AddressAlign: 4
  Relocations:
    - Offset: 0x0
      Symbol: T1
      Type:   R_MIPS_26

Symbols:
  Global:
    - Name:    T0
      Section: .text
      Type:    STT_FUNC
      Value:   0x0
      Size:    0x8
    - Name:    T1
...