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 */
54 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
59 . = ALIGN(PAGE_SIZE); /* Init code and data */
61 INIT_TEXT_SECTION(PAGE_SIZE)
65 .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
71 PERCPU_SECTION(L1_CACHE_BYTES)
74 * .exit.text is discarded at runtime, not link time, to deal with
75 * references from __bug_table
77 .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { EXIT_TEXT }
78 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
82 BSS_SECTION(0, PAGE_SIZE, 4)