forked from OpenOrbis/OpenOrbis-PS4-Toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.x
68 lines (55 loc) · 1.04 KB
/
link.x
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
SECTIONS
{
# Combine text, rodata, and eh_frame stuff
.text : ALIGN(0x4000) {
# "/libexec/ld-elf.so.1"
QUAD(0x6365786562696C2F);
QUAD(0x2E666C652D646C2F);
QUAD(0x00000000312E6F73);
QUAD(0x0000000000000000);
# original .text
*(.text)
}
.rodata : ALIGN(0x10) {
*(.rodata)
}
.eh_frame : {
*(.eh_frame)
}
.eh_frame_hdr : {
*(.eh_frame_hdr)
}
.data.rel.ro : ALIGN(0x4000) {
*(.data.rel.ro)
}
.tls : ALIGN(0x4000) {
*(.tdata);
*(.tbss);
}
# Align .got to 0x4000 if .data.rel.ro doesn't exist
. = (SIZEOF(.data.rel.ro) > 0 ? . : ALIGN(.,0x4000));
.got : {
*(.got)
}
# Align .got.plt to 0x4000 if .got doesn't exist
. = (SIZEOF(.got) > 0 ? . : ALIGN(.,0x4000));
.got.plt : {
*(.got.plt)
}
.data.sce_process_param : ALIGN(0x4000) {
*(.data.sce_process_param)
}
.data.sce_module_param : ALIGN(0x4000) {
*(.data.sce_module_param)
}
.data : {
*(.data)
}
.bss : {
*(.bss)
}
# Force .got.plt to appear, because SPRX requires a valid .got.plt.
/DISCARD/ : {
QUAD(_GLOBAL_OFFSET_TABLE_)
}
}