1 /* SPDX-License-Identifier: GPL-2.0 */
3 * ld script to make SuperH Linux kernel
4 * Written by Niibe Yutaka and Paul Mundt
7 #define LOAD_OFFSET PAGE_OFFSET
14 #include <asm/thread_info.h>
15 #include <asm/cache.h>
16 #include <asm/vmlinux.lds.h>
19 #define MEMORY_OFFSET 0
21 #define MEMORY_OFFSET __MEMORY_START
27 . = PAGE_OFFSET + MEMORY_OFFSET + PHYSICAL_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
29 _text = .; /* Text and read-only data */
31 .empty_zero_page : AT(ADDR(.empty_zero_page) - LOAD_OFFSET) {
35 .text : AT(ADDR(.text) - LOAD_OFFSET) {
47 _etext = .; /* End of text section */
55 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
60 . = ALIGN(PAGE_SIZE); /* Init code and data */
62 INIT_TEXT_SECTION(PAGE_SIZE)
66 .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
72 PERCPU_SECTION(L1_CACHE_BYTES)
75 * .exit.text is discarded at runtime, not link time, to deal with
76 * references from __bug_table
78 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { EXIT_TEXT }
79 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
83 BSS_SECTION(0, PAGE_SIZE, 4)