forked from jonasblixt/punchboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.lds
66 lines (56 loc) · 1.14 KB
/
link.lds
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
/**
* Punch BOOT
*
* Copyright (C) 2020 Jonas Blixt <[email protected]>
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
SECTIONS
{
. = PB_ENTRY;
.text :
{
PROVIDE (_code_start = .);
*(.vectors .vectors.*)
. = ALIGN(8);
*(.text .text.*)
. = ALIGN(8);
_etext = .;
PROVIDE (_code_end = .);
} > pbram
.data :
{
PROVIDE (_data_region_start = .);
*(.data)
*(.rodata .rodata.*)
. = ALIGN(8);
_edata = .;
PROVIDE (_data_region_end = .);
} > pbram
.bss (NOLOAD):
{
PROVIDE (_zero_region_start = .);
_bss_start = .;
*(.bss)
. = ALIGN(8);
_bss_end = .;
PROVIDE (_zero_region_end = .);
} > pbram2
.stack (NOLOAD):
{
PROVIDE(_stack_start = .);
. = . + 2*1024 ;
. = ALIGN(8);
PROVIDE(_stack_end = .);
} > pbram2
.bigbuffer (NOLOAD):
{
PROVIDE(_big_buffer_start = .);
*(.bigbuffer .bigbuffer*)
. = ALIGN(8);
PROVIDE(_big_buffer_end = .);
} > dram
PROVIDE(end = .);
}
_bss_size = (_bss_end - _bss_start)>>3;