-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathn64.ld
More file actions
92 lines (69 loc) · 1.46 KB
/
n64.ld
File metadata and controls
92 lines (69 loc) · 1.46 KB
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
86
87
88
89
90
91
/* name of main function */
ENTRY_POINT = main;
/* Libaries here -- add or remove as needed */
SEARCH_DIR( lib )
/* This script is for MIPS */
OUTPUT_ARCH( mips )
OUTPUT_FORMAT( "elf32-bigmips", "elf32-bigmips", "elf32-littlemips" )
/* Entrypoint is function `n64start` */
ENTRY( ENTRY_POINT )
SECTIONS
{
/* Program run address */
. = ADDRESS_START;
/* Machine code */
.text ALIGN( 4 ):
{
/* Pad with NULL */
FILL( 0 );
/* Address to start of text section */
__text_start = . ;
/* Data goes here */
*(.text)
/* Address to end of text section */
. = ALIGN( 8 );
__text_end = . ;
}
/* Initialized data */
.data ALIGN( 8 ):
{
/* Pad with NULL */
FILL( 0 );
/* Address to start of data section */
__data_start = . ;
/* Data goes here*/
*(.data);
/* Data pointer */
. = ALIGN( 8 );
_gp = . ;
*(.sdata)
/* Address to end of data section */
__data_end = . ;
}
/* Read-only data */
.rodata ALIGN( 8 ):
{
/* Pad with NULL */
FILL( 0 );
/* Address to start of rodata section */
__rodata_start = . ;
/* Data goes here*/
*(.rodata);
/* Address to end of rodata section */
__rodata_end = . ;
}
/* Memory initialized to zero */
.bss ALIGN( 8 ):
{
/* Address to start of BSS section */
__bss_start = . ;
/* BSS data */
*(.bss)
*(.sbss)
/* Address to end of BSS section */
__bss_end = . ;
}
/* End of our memory use */
. = ALIGN( 8 );
end = .;
}