-
Notifications
You must be signed in to change notification settings - Fork 3
/
link64.lds
126 lines (109 loc) · 2.78 KB
/
link64.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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* SPDX-License-Identifier: ISC */
/*
* Author(s): Dan Williams <[email protected]>
* Martin Lucina <[email protected]>
* Simon Kuenzer <[email protected]>
* Haibo Xu <[email protected]>
*
* Copyright (c) 2016, IBM
* (c) 2016-2017 Docker, Inc.
* (c) 2017, NEC Europe Ltd.
* (c) 2018, Arm Ltd. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software
* for any purpose with or without fee is hereby granted, provided
* that the above copyright notice and this permission notice appear
* in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
ENTRY(_start)
SECTIONS {
. = 0x100000;
/* Code */
_stext = .;
.text :
{
*(.text)
*(.text.*)
}
_etext = .;
. = ALIGN(0x1000);
__eh_frame_start = .;
.eh_frame :
{
*(.eh_frame)
*(.eh_frame.*)
}
__eh_frame_end = .;
__eh_frame_hdr_start = .;
.eh_frame_hdr :
{
*(.eh_frame_hdr)
*(.eh_frame_hdr.*)
}
__eh_frame_hdr_end = .;
. = ALIGN(0x1000);
uk_ctortab_start = .;
.uk_ctortab :
{
KEEP(*(SORT_BY_NAME(.uk_ctortab[0-7])))
}
uk_ctortab_end = .;
uk_inittab_start = .;
.uk_inittab :
{
KEEP(*(SORT_BY_NAME(.uk_inittab_[1-6][0-9])))
}
uk_inittab_end = .;
. = ALIGN(0x1000);
/* Read-only data */
.rodata :
{
*(.rodata)
*(.rodata.*)
}
_erodata = .;
/* Constructor tables (read-only) */
. = ALIGN(0x8);
_ctors = .;
.preinit_array : {
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
}
. = ALIGN(0x8);
.init_array : {
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
KEEP (*(.init_array .ctors))
PROVIDE_HIDDEN (__init_array_end = .);
}
_ectors = .;
. = ALIGN(0x1000);
/* Read-write data (initialized) */
.data :
{
*(.data)
*(.data.*)
}
_edata = .;
. = ALIGN(0x1000);
/* Read-write data (uninitialized) */
.bss :
{
*(.bss)
*(.bss.*)
*(COMMON)
}
. = ALIGN(0x1000);
_ebss = .;
_end = .;
}