~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/riscv/kernel/vmlinux-xip.lds.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (C) 2012 Regents of the University of California
  4  * Copyright (C) 2017 SiFive
  5  * Copyright (C) 2020 Vitaly Wool, Konsulko AB
  6  */
  7 
  8 #include <asm/pgtable.h>
  9 #define LOAD_OFFSET KERNEL_LINK_ADDR
 10 /* No __ro_after_init data in the .rodata section - which will always be ro */
 11 #define RO_AFTER_INIT_DATA
 12 
 13 #include <asm/vmlinux.lds.h>
 14 #include <asm/page.h>
 15 #include <asm/cache.h>
 16 #include <asm/thread_info.h>
 17 #include <asm/set_memory.h>
 18 
 19 OUTPUT_ARCH(riscv)
 20 ENTRY(_start)
 21 
 22 jiffies = jiffies_64;
 23 
 24 SECTIONS
 25 {
 26         /* Beginning of code and text segment */
 27         . = LOAD_OFFSET;
 28         _xiprom = .;
 29         _start = .;
 30         HEAD_TEXT_SECTION
 31         INIT_TEXT_SECTION(PAGE_SIZE)
 32         /* we have to discard exit text and such at runtime, not link time */
 33         __exittext_begin = .;
 34         .exit.text :
 35         {
 36                 EXIT_TEXT
 37         }
 38         __exittext_end = .;
 39 
 40         .text : {
 41                 _text = .;
 42                 _stext = .;
 43                 TEXT_TEXT
 44                 SCHED_TEXT
 45                 LOCK_TEXT
 46                 KPROBES_TEXT
 47                 ENTRY_TEXT
 48                 IRQENTRY_TEXT
 49                 SOFTIRQENTRY_TEXT
 50                 _etext = .;
 51         }
 52         RO_DATA(L1_CACHE_BYTES)
 53         .srodata : {
 54                 *(.srodata*)
 55         }
 56         .init.rodata : {
 57                 INIT_SETUP(16)
 58                 INIT_CALLS
 59                 CON_INITCALL
 60                 INIT_RAM_FS
 61         }
 62         _exiprom = .;                   /* End of XIP ROM area */
 63 
 64 
 65 /*
 66  * From this point, stuff is considered writable and will be copied to RAM
 67  */
 68         __data_loc = ALIGN(PAGE_SIZE);          /* location in file */
 69         . = ALIGN(SECTION_ALIGN);               /* location in memory */
 70 
 71 #undef LOAD_OFFSET
 72 #define LOAD_OFFSET (KERNEL_LINK_ADDR + _sdata - __data_loc)
 73 
 74         _sdata = .;                     /* Start of data section */
 75         _data = .;
 76         RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
 77         _edata = .;
 78         __start_ro_after_init = .;
 79         .data.ro_after_init : AT(ADDR(.data.ro_after_init) - LOAD_OFFSET) {
 80                 *(.data..ro_after_init)
 81         }
 82         __end_ro_after_init = .;
 83 
 84         . = ALIGN(PAGE_SIZE);
 85         __init_begin = .;
 86         .init.data : {
 87                 INIT_DATA
 88         }
 89         .exit.data : {
 90                 EXIT_DATA
 91         }
 92         . = ALIGN(8);
 93         __soc_early_init_table : {
 94                 __soc_early_init_table_start = .;
 95                 KEEP(*(__soc_early_init_table))
 96                 __soc_early_init_table_end = .;
 97         }
 98         __soc_builtin_dtb_table : {
 99                 __soc_builtin_dtb_table_start = .;
100                 KEEP(*(__soc_builtin_dtb_table))
101                 __soc_builtin_dtb_table_end = .;
102         }
103 
104         __init_end = .;
105 
106         . = ALIGN(16);
107         .xip.traps : {
108                 __xip_traps_start = .;
109                 *(.xip.traps)
110                 __xip_traps_end = .;
111         }
112 
113         . = ALIGN(PAGE_SIZE);
114         .sdata : {
115                 __global_pointer$ = . + 0x800;
116                 *(.sdata*)
117                 *(.sbss*)
118         }
119 
120         BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
121 
122         PERCPU_SECTION(L1_CACHE_BYTES)
123 
124         .rel.dyn : AT(ADDR(.rel.dyn) - LOAD_OFFSET) {
125                 *(.rel.dyn*)
126         }
127 
128         /*
129          * End of copied data. We need a dummy section to get its LMA.
130          * Also located before final ALIGN() as trailing padding is not stored
131          * in the resulting binary file and useless to copy.
132          */
133         .data.endmark : AT(ADDR(.data.endmark) - LOAD_OFFSET) { }
134         _edata_loc = LOADADDR(.data.endmark);
135 
136         . = ALIGN(PAGE_SIZE);
137         _end = .;
138 
139         STABS_DEBUG
140         DWARF_DEBUG
141 
142         DISCARDS
143 }

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php