1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012 Regents of the University of California
4 * Copyright (C) 2017 SiFive
7 #define LOAD_OFFSET PAGE_OFFSET
8 #include <asm/vmlinux.lds.h>
10 #include <asm/cache.h>
11 #include <asm/thread_info.h>
12 #include <asm/set_memory.h>
13 #include "image-vars.h"
15 #include <linux/sizes.h>
21 PECOFF_SECTION_ALIGNMENT = 0x1000;
22 PECOFF_FILE_ALIGNMENT = 0x200;
26 /* Beginning of code and text segment */
47 . = ALIGN(SECTION_ALIGN);
49 __init_text_begin = .;
50 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) ALIGN(SECTION_ALIGN) { \
57 __soc_early_init_table : {
58 __soc_early_init_table_start = .;
59 KEEP(*(__soc_early_init_table))
60 __soc_early_init_table_end = .;
62 __soc_builtin_dtb_table : {
63 __soc_builtin_dtb_table_start = .;
64 KEEP(*(__soc_builtin_dtb_table))
65 __soc_builtin_dtb_table_end = .;
67 /* we have to discard exit text and such at runtime, not link time */
74 . = ALIGN(SECTION_ALIGN);
76 . = ALIGN(PECOFF_SECTION_ALIGNMENT);
77 __pecoff_text_end = .;
79 /* Start of init data section */
80 __init_data_begin = .;
86 PERCPU_SECTION(L1_CACHE_BYTES)
95 /* Start of data section */
97 RO_DATA(SECTION_ALIGN)
102 EXCEPTION_TABLE(0x10)
104 . = ALIGN(SECTION_ALIGN);
107 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
109 __global_pointer$ = . + 0x800;
114 .pecoff_edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGNMENT); }
115 __pecoff_data_raw_size = ABSOLUTE(. - __pecoff_text_end);
118 /* End of data section */
121 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
124 . = ALIGN(PECOFF_SECTION_ALIGNMENT);
125 __pecoff_data_virt_size = ABSOLUTE(. - __pecoff_text_end);