2 text PT_LOAD FLAGS(5); /* R_E */
3 data PT_LOAD FLAGS(7); /* RWE */
4 user PT_LOAD FLAGS(7); /* RWE */
5 data.init PT_LOAD FLAGS(7); /* RWE */
7 percpu PT_LOAD FLAGS(7); /* RWE */
9 data.init2 PT_LOAD FLAGS(7); /* RWE */
10 note PT_NOTE FLAGS(0); /* ___ */
15 phys_startup_64 = startup_64 - LOAD_OFFSET;
17 /* Text and read-only data */
18 .text : AT(ADDR(.text) - LOAD_OFFSET) {
20 /* First the code that has to be first for bootstrapping */
31 /* End of text section */
39 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
40 __start___ex_table = .;
42 __stop___ex_table = .;
47 /* Align data segment to page size boundary */
50 .data : AT(ADDR(.data) - LOAD_OFFSET) {
53 /* End of data section */
58 .data.cacheline_aligned :
59 AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
61 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
62 *(.data.cacheline_aligned)
65 . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES);
66 .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
70 #define VSYSCALL_ADDR (-10*1024*1024)
71 #define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + \
72 SIZEOF(.data.read_mostly) + 4095) & ~(4095))
73 #define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + \
74 SIZEOF(.data.read_mostly) + 4095) & ~(4095))
76 #define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR)
77 #define VLOAD(x) (ADDR(x) - VLOAD_OFFSET)
79 #define VVIRT_OFFSET (VSYSCALL_ADDR - VSYSCALL_VIRT_ADDR)
80 #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET)
83 .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) {
87 __vsyscall_0 = VSYSCALL_VIRT_ADDR;
89 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
90 .vsyscall_fn : AT(VLOAD(.vsyscall_fn)) {
94 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
95 .vsyscall_gtod_data : AT(VLOAD(.vsyscall_gtod_data)) {
96 *(.vsyscall_gtod_data)
99 vsyscall_gtod_data = VVIRT(.vsyscall_gtod_data);
100 .vsyscall_clock : AT(VLOAD(.vsyscall_clock)) {
103 vsyscall_clock = VVIRT(.vsyscall_clock);
106 .vsyscall_1 ADDR(.vsyscall_0) + 1024: AT(VLOAD(.vsyscall_1)) {
109 .vsyscall_2 ADDR(.vsyscall_0) + 2048: AT(VLOAD(.vsyscall_2)) {
113 .vgetcpu_mode : AT(VLOAD(.vgetcpu_mode)) {
116 vgetcpu_mode = VVIRT(.vgetcpu_mode);
118 . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
119 .jiffies : AT(VLOAD(.jiffies)) {
122 jiffies = VVIRT(.jiffies);
124 .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) {
128 . = VSYSCALL_VIRT_ADDR + PAGE_SIZE;
131 #undef VSYSCALL_PHYS_ADDR
132 #undef VSYSCALL_VIRT_ADDR
139 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
140 . = ALIGN(THREAD_SIZE);
144 .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
145 . = ALIGN(PAGE_SIZE);
146 *(.data.page_aligned)
149 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
150 /* might get freed after init */
151 . = ALIGN(PAGE_SIZE);
156 . = ALIGN(PAGE_SIZE);
160 /* Init code and data */
161 . = ALIGN(PAGE_SIZE);
162 __init_begin = .; /* paired with __init_end */
163 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
169 .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
170 __initdata_begin = .;
175 .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
182 .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
183 __initcall_start = .;
188 .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
189 __con_initcall_start = .;
190 *(.con_initcall.init)
191 __con_initcall_end = .;
194 .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
195 __x86_cpu_dev_start = .;
197 __x86_cpu_dev_end = .;
203 .parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) {
204 __parainstructions = .;
206 __parainstructions_end = .;
209 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {
211 __alt_instructions = .;
213 __alt_instructions_end = .;
216 .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) {
217 *(.altinstr_replacement)
221 * .exit.text is discard at runtime, not link time, to deal with
222 * references from .altinstructions and .eh_frame
224 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
228 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
232 #ifdef CONFIG_BLK_DEV_INITRD
233 . = ALIGN(PAGE_SIZE);
234 .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
235 __initramfs_start = .;
243 * percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
244 * output PHDR, so the next output section - __data_nosave - should
245 * start another section data.init2. Also, pda should be at the head of
246 * percpu area. Preallocate it and define the percpu offset symbol
247 * so that it can be accessed as a percpu variable.
249 . = ALIGN(PAGE_SIZE);
250 PERCPU_VADDR(0, :percpu)
255 . = ALIGN(PAGE_SIZE);
258 .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
259 . = ALIGN(PAGE_SIZE);
262 . = ALIGN(PAGE_SIZE);
265 /* use another section data.init2, see PERCPU_VADDR() above */
267 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
268 . = ALIGN(PAGE_SIZE);
269 __bss_start = .; /* BSS */
275 .brk : AT(ADDR(.brk) - LOAD_OFFSET) {
276 . = ALIGN(PAGE_SIZE);
278 . += 64 * 1024; /* 64k alignment slop space */
279 *(.brk_reservation) /* areas brk users have reserved */
285 /* Sections to be discarded */