blob: ec87e67feb19e4692337fa78c82cc67b6ffd0dce [file] [log] [blame]
Richard Kuoe95bf452011-10-31 18:55:58 -05001/*
2 * Linker script for Hexagon kernel
3 *
Richard Kuof6b708c2014-04-08 19:00:45 -05004 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
Richard Kuoe95bf452011-10-31 18:55:58 -05005 *
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
Richard Kuoe95bf452011-10-31 18:55:58 -050021#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 */
25OUTPUT_ARCH(hexagon)
26ENTRY(stext)
27
28jiffies = jiffies_64;
29
30/*
31See asm-generic/vmlinux.lds.h for expansion of some of these macros.
32See asm-generic/sections.h for seemingly required labels.
33*/
34
35#define PAGE_SIZE _PAGE_SIZE
36
Richard Kuoe95bf452011-10-31 18:55:58 -050037SECTIONS
38{
Richard Kuo8f5a0b9d2013-03-22 16:05:40 -050039 . = PAGE_OFFSET;
Richard Kuoe95bf452011-10-31 18:55:58 -050040
41 __init_begin = .;
42 HEAD_TEXT_SECTION
43 INIT_TEXT_SECTION(PAGE_SIZE)
44 PERCPU_SECTION(L1_CACHE_BYTES)
45 __init_end = .;
46
47 . = ALIGN(_PAGE_SIZE);
48 _stext = .;
Richard Kuo8f5a0b9d2013-03-22 16:05:40 -050049 .text : AT(ADDR(.text)) {
Richard Kuoe95bf452011-10-31 18:55:58 -050050 _text = .;
51 TEXT_TEXT
52 SCHED_TEXT
Chris Metcalf6727ad92016-10-07 17:02:55 -070053 CPUIDLE_TEXT
Richard Kuoe95bf452011-10-31 18:55:58 -050054 LOCK_TEXT
55 KPROBES_TEXT
56 *(.fixup)
57 }
58 _etext = .;
59
60 INIT_DATA_SECTION(PAGE_SIZE)
61
62 _sdata = .;
Richard Kuof6b708c2014-04-08 19:00:45 -050063 RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
Richard Kuoe95bf452011-10-31 18:55:58 -050064 RO_DATA_SECTION(PAGE_SIZE)
65 _edata = .;
66
67 EXCEPTION_TABLE(16)
68 NOTES
69
70 BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)
71
72 _end = .;
73
74 /DISCARD/ : {
75 EXIT_TEXT
76 EXIT_DATA
77 EXIT_CALL
78 }
79
80 STABS_DEBUG
81 DWARF_DEBUG
82
83}