1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012 Regents of the University of California
4 * Copyright (C) 2017 SiFive
7 #include <asm/pgtable.h>
8 #define LOAD_OFFSET KERNEL_LINK_ADDR
9 #include <asm/vmlinux.lds.h>
11 #include <asm/cache.h>
12 #include <asm/thread_info.h>
13 #include <asm/set_memory.h>
14 #include "image-vars.h"
16 #include <linux/sizes.h>
22 PECOFF_SECTION_ALIGNMENT = 0x1000;
23 PECOFF_FILE_ALIGNMENT = 0x200;
27 /* Beginning of code and text segment */
48 . = ALIGN(SECTION_ALIGN);
50 __init_text_begin = .;
51 .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) ALIGN(SECTION_ALIGN) { \
58 __soc_early_init_table : {
59 __soc_early_init_table_start = .;
60 KEEP(*(__soc_early_init_table))
61 __soc_early_init_table_end = .;
63 __soc_builtin_dtb_table : {
64 __soc_builtin_dtb_table_start = .;
65 KEEP(*(__soc_builtin_dtb_table))
66 __soc_builtin_dtb_table_end = .;
68 /* we have to discard exit text and such at runtime, not link time */
75 . = ALIGN(SECTION_ALIGN);
77 . = ALIGN(PECOFF_SECTION_ALIGNMENT);
78 __pecoff_text_end = .;
80 /* Start of init data section */
81 __init_data_begin = .;
87 PERCPU_SECTION(L1_CACHE_BYTES)
103 /* Start of data section */
105 RO_DATA(SECTION_ALIGN)
110 EXCEPTION_TABLE(0x10)
112 . = ALIGN(SECTION_ALIGN);
115 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
117 __global_pointer$ = . + 0x800;
122 .pecoff_edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGNMENT); }
123 __pecoff_data_raw_size = ABSOLUTE(. - __pecoff_text_end);
126 /* End of data section */
129 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
132 . = ALIGN(PECOFF_SECTION_ALIGNMENT);
133 __pecoff_data_virt_size = ABSOLUTE(. - __pecoff_text_end);