-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlink.ld
More file actions
88 lines (75 loc) · 1.82 KB
/
link.ld
File metadata and controls
88 lines (75 loc) · 1.82 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
/*
* Copyright (C) 2024 Université de Lille
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
OUTPUT_FORMAT(
"elf32-littlearm",
"elf32-littlearm",
"elf32-littlearm"
)
OUTPUT_ARCH(arm)
ENTRY(start)
SECTIONS
{
/*
* The .rom output section gathers all input sections that
* must be retained in ROM
*/
.rom :
{
. = ALIGN( 4 ) ;
__rom_start = . ;
*(.text*)
. = ALIGN( 4 ) ;
*(.rodata*)
. = ALIGN( 4 ) ;
__rom_end = . ;
}
__rom_size = __rom_end - __rom_start;
/*
* The .got output section gathers all .got input sections
* that need to be relocated to RAM and patched by the CRT0.
* To optimize ROM space, this section should be placed
* immediately after the .rom section
*/
.got :
{
. = ALIGN( 4 ) ;
__got_start = . ;
*(.got*)
. = ALIGN( 4 ) ;
__got_end = . ;
}
__got_size = __got_end - __got_start;
/*
* The .rom.ram output section gathers all input sections
* with initialized global variables that the CRT0 must copy
* from ROM to RAM
*/
.rom.ram :
{
. = ALIGN( 4 ) ;
__rom_ram_start = . ;
*(.data*)
. = ALIGN( 4 ) ;
__rom_ram_end = . ;
}
__rom_ram_size = __rom_ram_end - __rom_ram_start;
/*
* The .ram output section gathers all input sections with
* uninitialized global variables that must be initialized
* to zero in RAM
*/
.ram (NOLOAD) :
{
. = ALIGN( 4 ) ;
__ram_start = . ;
*(.bss* COMMON)
. = ALIGN( 4 ) ;
__ram_end = . ;
}
__ram_size = __ram_end - __ram_start;
}