blob: 450641c6af0ff7e9022f2bfa2c5b40e81841ac2f (
plain)
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
/* -----------------------------------------------------------------------
*
* Copyright 2008-2009 H. Peter Anvin - All Rights Reserved
* Copyright 2009 Intel Corporation; author: H. Peter Anvin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston MA 02110-1301, USA; either version 2 of the License, or
* (at your option) any later version; incorporated herein by reference.
*
* ----------------------------------------------------------------------- */
/*
* Linker script for the SYSLINUX core
*/
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SECTIONS
{
. = 0;
ImageBase = .; /* For gnu-efi's crt0 */
__module_start = .;
. = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;
.text : {
FILL(0x90909090)
__text_start = .;
*(.text)
*(.text.*)
__text_end = .;
}
. = ALIGN(16);
.rodata : {
__rodata_start = .;
*(.rodata)
*(.rodata.*)
__rodata_end = .;
}
. = ALIGN(4);
.ctors : {
__ctors_start = .;
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__ctors_end = .;
}
.dtors : {
__dtors_start = .;
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
__dtors_end = .;
}
. = ALIGN(4096);
.rel : {
*(.rel.got)
*(.rel.data)
*(.rel.data.*)
*(.rel.ctors)
}
. = ALIGN(4);
.gnu.hash : {
__gnu_hash_start = .;
*(.gnu.hash)
__gnu_hash_end = .;
}
.dynsym : {
__dynsym_start = .;
*(.dynsym)
__dynsym_end = .;
}
. = ALIGN(4);
.dynstr : {
__dynstr_start = .;
*(.dynstr)
__dynstr_end = .;
}
. = ALIGN(4);
.dynlink : {
__dynlink_start = .;
*(.dynlink)
__dynlink_end = .;
}
. = ALIGN(4);
.got : {
__got_start = .;
KEEP (*(.got.plt))
KEEP (*(.got))
__got_end = .;
}
. = ALIGN(4);
.dynamic : {
__dynamic_start = .;
*(.dynamic)
__dynamic_end = .;
}
. = ALIGN(16);
.data : {
__data_start = .;
*(.data)
*(.data.*)
*(.lowmem)
__data_end = .;
}
.reloc : {
*(.reloc)
}
.symtab : {
*(.symtab)
}
.strtab : {
*(.strtab)
}
.bss (NOLOAD) : {
/* the EFI loader doesn't seem to like a .bss section,
so we stick it all into .data: */
__bss_start = .;
*(.bss)
*(.bss.*)
*(.bss16)
*(.hugebss)
*(COMMON)
__bss_end = .;
*(.sbss)
*(.scommon)
}
__bss_len = ABSOLUTE(__bss_end) - ABSOLUTE(__bss_start);
__bss_dwords = (__bss_len + 3) >> 2;
. = ALIGN(128);
/* Very large objects which don't need to be zeroed */
.hugebss : {
__hugebss_start = .;
*(.hugebss)
*(.hugebss.*)
__hugebss_end = .;
}
_end = .;
/* Stuff we don't need... */
/DISCARD/ : {
*(.eh_frame)
*(.comment)
}
}
|