]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/Mips/plt-entry-mixed-4.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / Mips / plt-entry-mixed-4.test
1 # REQUIRES: mips
2
3 # Conditions:
4 # a) Object file contains R_MIPS_26 relocation refers to the microMIPS symbol.
5 # Check:
6 # a) PLT contains a regular non-compressed entry.
7
8 # Build shared library
9 # RUN: yaml2obj -format=elf -docnum 1 %s > %t.so.o
10 # RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t.so.o
11
12 # Build executable
13 # RUN: yaml2obj -format=elf -docnum 2 %s > %t.o.o
14 # RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o.o %t.so
15 # RUN: llvm-objdump -s %t.exe | FileCheck %s
16
17 # FIXME (simon): Check the disassembler output when llvm-objdump starts
18 #                to support microMIPS instruction encoding.
19
20 # CHECK: Contents of section .plt:
21 # CHECK-NEXT:  400170 40001c3c 0020998f 00209c27 23c01c03  @..<. ... .'#...
22 # CHECK-NEXT:  400180 2178e003 82c01800 09f82003 feff1827  !x........ ....'
23 # CHECK-NEXT:  400190 40000f3c 0820f98d 08002003 0820f825  @..<. .... .. .%
24
25 # so.o
26 ---
27 FileHeader:
28   Class:   ELFCLASS32
29   Data:    ELFDATA2LSB
30   Type:    ET_REL
31   Machine: EM_MIPS
32   Flags:   [EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI_O32,
33             EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]
34
35 Sections:
36   - Name:         .text
37     Type:         SHT_PROGBITS
38     Size:         0x0C
39     AddressAlign: 16
40     Flags:        [SHF_EXECINSTR, SHF_ALLOC]
41
42 Symbols:
43   Global:
44     - Name:    T1
45       Section: .text
46       Type:    STT_FUNC
47       Value:   0x0
48       Size:    4
49       Other:   [STO_MIPS_MICROMIPS]
50
51 # o.o
52 ---
53 FileHeader:
54   Class:   ELFCLASS32
55   Data:    ELFDATA2LSB
56   Type:    ET_REL
57   Machine: EM_MIPS
58   Flags:   [EF_MIPS_CPIC, EF_MIPS_ABI_O32,
59             EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS]
60
61 Sections:
62 - Name:         .text
63   Type:         SHT_PROGBITS
64   Content:      "0000000C00000000"
65   AddressAlign: 16
66   Flags:        [SHF_EXECINSTR, SHF_ALLOC]
67
68 - Name:         .rel.text
69   Type:         SHT_REL
70   Info:         .text
71   AddressAlign: 4
72   Relocations:
73     - Offset: 0x0
74       Symbol: T1
75       Type:   R_MIPS_26
76
77 Symbols:
78   Global:
79     - Name:    T0
80       Section: .text
81       Type:    STT_FUNC
82       Value:   0x0
83       Size:    0x8
84     - Name:    T1
85 ...