blob: f9ceba13f28c30d1c2ccba98469610ac906ad6c0 (
plain)
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
|
# Check that relocations against __gnu_local_gp use "gp" value as target.
# RUN: yaml2obj -format=elf %S/Inputs/pic-obj.yaml > %t-pic.o
# RUN: lld -flavor gnu -target mipsel -shared -o %t.so %t-pic.o
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor gnu -target mipsel -e T0 -o %t.exe %t.o %t.so
# RUN: llvm-readobj -symbols %t.exe | FileCheck -check-prefix=SYM %s
# RUN: llvm-objdump -s %t.exe | FileCheck -check-prefix=SEC %s
# SYM: Name: _gp (203)
# SYM-NEXT: Value: 0x408FF0
# SEC: Contents of section .text:
# SEC-NEXT: 4001a0 41000000 f08f0000 64001000 A.......d...
# SEC: Contents of section .got:
# SEC-NEXT: 401000 00000000 00000080 ........
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_MIPS
Flags: [ EF_MIPS_NOREORDER, EF_MIPS_CPIC,
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2 ]
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Size: 12
- Name: .rel.text
Type: SHT_REL
Link: .symtab
Info: .text
AddressAlign: 0x04
Relocations:
- Offset: 0x00
Symbol: __gnu_local_gp
Type: R_MIPS_HI16
- Offset: 0x04
Symbol: __gnu_local_gp
Type: R_MIPS_LO16
- Offset: 0x08
Symbol: T1
Type: R_MIPS_26
Symbols:
Local:
- Name: .text
Type: STT_SECTION
Section: .text
Global:
- Name: T0
Type: STT_FUNC
Section: .text
Size: 0x08
- Name: __gnu_local_gp
- Name: T1
|