1 /* SPDX-License-Identifier: GPL-2.0-or-later * !! 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* << 3 * OpenRISC vmlinux.lds.S << 4 * << 5 * Linux architectural port borrowing liberall << 6 * others. All original copyrights apply as p << 7 * declaration. << 8 * << 9 * Modifications for the OpenRISC architecture << 10 * Copyright (C) 2003 Matjaz Breskvar <phoenix@ << 11 * Copyright (C) 2010-2011 Jonas Bonn <jonas@so << 12 * << 13 * ld script for OpenRISC architecture << 14 */ << 15 << 16 /* TODO << 17 * - clean up __offset & stuff << 18 * - change all 8192 alignment to << 19 * - recheck if all alignments ar << 20 */ << 21 2 22 # define LOAD_OFFSET PAGE_OFFSET !! 3 #define EMITS_PT_NOTE 23 # define LOAD_BASE PAGE_OFFSET !! 4 #define RO_EXCEPTION_TABLE_ALIGN 16 24 5 25 #include <asm/page.h> << 26 #include <asm/cache.h> << 27 #include <asm/thread_info.h> << 28 #include <asm-generic/vmlinux.lds.h> 6 #include <asm-generic/vmlinux.lds.h> >> 7 #include <asm/thread_info.h> >> 8 #include <asm/cache.h> >> 9 #include <asm/page.h> >> 10 #include <asm/setup.h> 29 11 30 #ifdef __OR1K__ !! 12 OUTPUT_FORMAT("elf64-alpha") 31 #define __OUTPUT_FORMAT "elf32-or1k" !! 13 OUTPUT_ARCH(alpha) 32 #else !! 14 ENTRY(__start) 33 #define __OUTPUT_FORMAT "elf32-or32" !! 15 PHDRS { text PT_LOAD; note PT_NOTE; } 34 #endif !! 16 jiffies = jiffies_64; 35 << 36 OUTPUT_FORMAT(__OUTPUT_FORMAT, __OUTPUT_FORMAT << 37 jiffies = jiffies_64 + 4; << 38 << 39 SECTIONS 17 SECTIONS 40 { 18 { 41 /* Read-only sections, merged into tex !! 19 #ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS 42 . = LOAD_BASE ; !! 20 . = 0xfffffc0000310000; 43 !! 21 #else 44 _text = .; !! 22 . = 0xfffffc0001010000; 45 !! 23 #endif 46 /* _s_kernel_ro must be page aligned * << 47 . = ALIGN(PAGE_SIZE); << 48 _s_kernel_ro = .; << 49 << 50 .text : AT(ADDR(.tex << 51 { << 52 _stext = .; << 53 TEXT_TEXT << 54 SCHED_TEXT << 55 LOCK_TEXT << 56 KPROBES_TEXT << 57 IRQENTRY_TEXT << 58 SOFTIRQENTRY_TEXT << 59 *(.fixup) << 60 *(.text.__*) << 61 _etext = .; << 62 } << 63 /* TODO: Check if fixup and text.__* a << 64 * fixup is definitely necessary << 65 */ << 66 << 67 _sdata = .; << 68 << 69 /* Page alignment required for RO_DATA << 70 RO_DATA(PAGE_SIZE) << 71 _e_kernel_ro = .; << 72 << 73 /* Whatever comes after _e_kernel_ro h << 74 << 75 /* 32 here is cacheline size... rechec << 76 RW_DATA(32, PAGE_SIZE, PAGE_SIZE) << 77 << 78 _edata = .; << 79 << 80 EXCEPTION_TABLE(4) << 81 24 82 /* Init code and data */ !! 25 _text = .; /* Text and read-only data */ 83 . = ALIGN(PAGE_SIZE); !! 26 .text : { 84 __init_begin = .; !! 27 HEAD_TEXT >> 28 TEXT_TEXT >> 29 SCHED_TEXT >> 30 LOCK_TEXT >> 31 *(.fixup) >> 32 *(.gnu.warning) >> 33 } :text >> 34 swapper_pg_dir = SWAPPER_PGD; >> 35 _etext = .; /* End of text section */ 85 36 86 HEAD_TEXT_SECTION !! 37 RO_DATA(4096) 87 38 88 /* Page aligned */ !! 39 /* Will be freed after init */ >> 40 __init_begin = ALIGN(PAGE_SIZE); 89 INIT_TEXT_SECTION(PAGE_SIZE) 41 INIT_TEXT_SECTION(PAGE_SIZE) 90 << 91 /* Align __setup_start on 16 byte boun << 92 INIT_DATA_SECTION(16) 42 INIT_DATA_SECTION(16) 93 << 94 PERCPU_SECTION(L1_CACHE_BYTES) 43 PERCPU_SECTION(L1_CACHE_BYTES) >> 44 /* Align to THREAD_SIZE rather than PAGE_SIZE here so any padding page >> 45 needed for the THREAD_SIZE aligned init_task gets freed after init */ >> 46 . = ALIGN(THREAD_SIZE); >> 47 __init_end = .; >> 48 /* Freed after init ends here */ >> 49 >> 50 _sdata = .; /* Start of rw data section */ >> 51 _data = .; >> 52 RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 95 53 96 __init_end = .; !! 54 .got : { >> 55 *(.got) >> 56 } >> 57 .sdata : { >> 58 *(.sdata) >> 59 } >> 60 _edata = .; /* End of data section */ 97 61 98 BSS_SECTION(0, 0, 0x20) !! 62 BSS_SECTION(0, 0, 0) >> 63 _end = .; 99 64 100 _end = .; !! 65 .mdebug 0 : { >> 66 *(.mdebug) >> 67 } >> 68 .note 0 : { >> 69 *(.note) >> 70 } 101 71 102 /* Throw in the debugging sections */ << 103 STABS_DEBUG 72 STABS_DEBUG 104 DWARF_DEBUG 73 DWARF_DEBUG 105 ELF_DETAILS 74 ELF_DETAILS 106 75 107 /* Sections to be discarded -- must be << 108 DISCARDS 76 DISCARDS 109 } 77 }
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.