]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/Mips/rel-dynamic-09-micro.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / Mips / rel-dynamic-09-micro.test
1 # Conditions:
2 #   a) Linking a non-shared executable file.
3 #   b) Relocations' targets are undefined symbols.
4 # Check:
5 #   a) There should be no dynamic relocations.
6 #   b) There should be no PLT entries.
7 #
8 # RUN: yaml2obj -format=elf %s > %t-obj
9 # RUN: lld -flavor gnu -target mipsel --noinhibit-exec -e T0 -o %t2-exe %t-obj
10 # RUN: llvm-readobj -dt -r -s %t2-exe | FileCheck -check-prefix=PLT-SYM %s
11
12 # PLT-SYM:     Sections [
13 # PLT-SYM:       Section {
14 # PLT-SYM-NOT:     Name: .plt ({{[0-9]+}})
15
16 # PLT-SYM:      Relocations [
17 # PLT-SYM-NEXT: ]
18
19 # PLT-SYM:      DynamicSymbols [
20 # PLT-SYM-NEXT:   Symbol {
21 # PLT-SYM-NEXT:     Name: @ (0)
22 # PLT-SYM-NEXT:     Value: 0x0
23 # PLT-SYM-NEXT:     Size: 0
24 # PLT-SYM-NEXT:     Binding: Local (0x0)
25 # PLT-SYM-NEXT:     Type: None (0x0)
26 # PLT-SYM-NEXT:     Other: 0
27 # PLT-SYM-NEXT:     Section: Undefined (0x0)
28 # PLT-SYM-NEXT:   }
29 # PLT-SYM-NEXT: ]
30
31 !ELF
32 FileHeader: !FileHeader
33   Class:   ELFCLASS32
34   Data:    ELFDATA2LSB
35   Type:    ET_REL
36   Machine: EM_MIPS
37   Flags:   [ EF_MIPS_CPIC, EF_MIPS_ABI_O32,
38              EF_MIPS_ARCH_32R2, EF_MIPS_MICROMIPS ]
39
40 Sections:
41 - Name: .text
42   Type: SHT_PROGBITS
43   Content:  "0000000000000000"
44   AddressAlign: 16
45   Flags: [SHF_EXECINSTR, SHF_ALLOC]
46
47 - Name: .data
48   Type: SHT_PROGBITS
49   Content:  "0000000000000000"
50   AddressAlign: 16
51   Flags: [SHF_WRITE, SHF_ALLOC]
52
53 - Name: .rel.text
54   Type: SHT_REL
55   Info: .text
56   AddressAlign: 4
57   Relocations:
58     - Offset: 0x04
59       Symbol: T3
60       Type: R_MICROMIPS_26_S1
61
62 - Name: .rel.data
63   Type: SHT_REL
64   Info: .data
65   AddressAlign: 4
66   Relocations:
67     - Offset: 0x00
68       Symbol: T1
69       Type: R_MICROMIPS_HI16
70     - Offset: 0x00
71       Symbol: T1
72       Type: R_MICROMIPS_LO16
73     - Offset: 0x04
74       Symbol: T2
75       Type: R_MIPS_32
76
77     - Offset: 0x04
78       Symbol: D1
79       Type: R_MICROMIPS_HI16
80     - Offset: 0x04
81       Symbol: D1
82       Type: R_MICROMIPS_LO16
83     - Offset: 0x04
84       Symbol: D2
85       Type: R_MIPS_32
86
87 Symbols:
88   Global:
89     - Name:    T0
90       Section: .text
91       Type:    STT_FUNC
92       Value:   0x0
93       Size:    8
94       Other:   [ STO_MIPS_MICROMIPS ]
95     - Name: T1
96       Type: STT_FUNC
97     - Name: T2
98       Type: STT_FUNC
99     - Name: T3
100       Type: STT_FUNC
101     - Name:    D0
102       Section: .data
103       Type:    STT_OBJECT
104       Value:   0x0
105       Size:    8
106     - Name: D1
107       Type: STT_OBJECT
108     - Name: D2
109       Type: STT_OBJECT