Linux-libre 4.19.123-gnu
[librecmc/linux-libre.git] / arch / hexagon / kernel / vmlinux.lds.S
1 /*
2  * Linker script for Hexagon kernel
3  *
4  * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 and
8  * only version 2 as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA.
19  */
20
21 #include <asm-generic/vmlinux.lds.h>
22 #include <asm/asm-offsets.h>    /*  Most of the kernel defines are here  */
23 #include <asm/mem-layout.h>     /*  except for page_offset  */
24 #include <asm/cache.h>          /*  and now we're pulling cache line size  */
25 #include <asm/thread_info.h>    /*  and we need THREAD_SIZE too */
26
27 OUTPUT_ARCH(hexagon)
28 ENTRY(stext)
29
30 jiffies = jiffies_64;
31
32 /*
33 See asm-generic/vmlinux.lds.h for expansion of some of these macros.
34 See asm-generic/sections.h for seemingly required labels.
35 */
36
37 #define PAGE_SIZE _PAGE_SIZE
38
39 SECTIONS
40 {
41         . = PAGE_OFFSET;
42
43         __init_begin = .;
44         HEAD_TEXT_SECTION
45         INIT_TEXT_SECTION(PAGE_SIZE)
46         PERCPU_SECTION(L1_CACHE_BYTES)
47         __init_end = .;
48
49         . = ALIGN(_PAGE_SIZE);
50         _stext = .;
51         .text : AT(ADDR(.text)) {
52                 _text = .;
53                 TEXT_TEXT
54                 SCHED_TEXT
55                 CPUIDLE_TEXT
56                 LOCK_TEXT
57                 KPROBES_TEXT
58                 *(.fixup)
59         }
60         _etext = .;
61
62         INIT_DATA_SECTION(PAGE_SIZE)
63
64         _sdata = .;
65                 RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
66                 RO_DATA_SECTION(PAGE_SIZE)
67         _edata = .;
68
69         EXCEPTION_TABLE(16)
70         NOTES
71
72         BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)
73
74         _end = .;
75
76         /DISCARD/ : {
77                 EXIT_TEXT
78                 EXIT_DATA
79                 EXIT_CALL
80         }
81
82         STABS_DEBUG
83         DWARF_DEBUG
84
85 }