-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathprogram.ld
More file actions
49 lines (41 loc) · 868 Bytes
/
program.ld
File metadata and controls
49 lines (41 loc) · 868 Bytes
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
/* Ralph OS Program Linker Script */
/* Programs are position-independent and can be loaded at any address */
ENTRY(_start)
SECTIONS
{
/* Start at 0 - actual load address is determined at runtime */
. = 0;
/* Code section */
.text ALIGN(4K) :
{
*(.text.boot) /* Entry point first */
*(.text .text.*)
}
/* Read-only data */
.rodata ALIGN(4K) :
{
*(.rodata .rodata.*)
}
/* Initialized data */
.data ALIGN(4K) :
{
*(.data .data.*)
}
/* Uninitialized data (zeroed) */
.bss ALIGN(4K) :
{
__bss_start = .;
*(.bss .bss.*)
*(COMMON)
__bss_end = .;
}
/* End of program */
_program_end = .;
/* Discard unnecessary sections */
/DISCARD/ :
{
*(.eh_frame)
*(.comment)
*(.note.*)
}
}