Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox...
[sfrench/cifs-2.6.git] / arch / nds32 / kernel / vmlinux.lds.S
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2005-2017 Andes Technology Corporation
3
4 #include <asm/page.h>
5 #include <asm/thread_info.h>
6 #include <asm/cache.h>
7 #include <asm/memory.h>
8
9 #define LOAD_OFFSET     (PAGE_OFFSET - PHYS_OFFSET)
10 #include <asm-generic/vmlinux.lds.h>
11
12 OUTPUT_ARCH(nds32)
13 ENTRY(_stext_lma)
14 jiffies = jiffies_64;
15
16 #if defined(CONFIG_GCOV_KERNEL)
17 #define NDS32_EXIT_KEEP(x)      x
18 #else
19 #define NDS32_EXIT_KEEP(x)
20 #endif
21
22 SECTIONS
23 {
24         _stext_lma = TEXTADDR - LOAD_OFFSET;
25         . = TEXTADDR;
26         __init_begin = .;
27         HEAD_TEXT_SECTION
28         .exit.text : {
29                 NDS32_EXIT_KEEP(EXIT_TEXT)
30         }
31         INIT_TEXT_SECTION(PAGE_SIZE)
32         INIT_DATA_SECTION(16)
33         .exit.data : {
34                 NDS32_EXIT_KEEP(EXIT_DATA)
35         }
36         PERCPU_SECTION(L1_CACHE_BYTES)
37         __init_end = .;
38
39         . = ALIGN(PAGE_SIZE);
40         _stext = .;
41         /* Real text segment */
42         .text : AT(ADDR(.text) - LOAD_OFFSET) {
43                 _text = .;              /* Text and read-only data      */
44                 TEXT_TEXT
45                 SCHED_TEXT
46                 CPUIDLE_TEXT
47                 LOCK_TEXT
48                 KPROBES_TEXT
49                 IRQENTRY_TEXT
50                 *(.fixup)
51         }
52
53         _etext = .;                     /* End of text and rodata section */
54
55         _sdata = .;
56         RO_DATA_SECTION(PAGE_SIZE)
57         RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
58         _edata  =  .;
59
60         EXCEPTION_TABLE(16)
61         NOTES
62         BSS_SECTION(4, 4, 4)
63         _end = .;
64
65         STABS_DEBUG
66         DWARF_DEBUG
67
68         DISCARDS
69 }