1/* SPDX-License-Identifier: GPL-2.0 */ 2#include <asm-generic/vmlinux.lds.h> 3#include <asm/vmlinux.lds.h> 4#include <asm/thread_info.h> 5#include <asm/page.h> 6#include <asm/sclp.h> 7 8OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") 9OUTPUT_ARCH(s390:64-bit) 10 11ENTRY(startup) 12 13SECTIONS 14{ 15 . = 0; 16 .head.text : { 17 _head = . ; 18 HEAD_TEXT 19 _ehead = . ; 20 } 21 .text : { 22 _text = .; /* Text */ 23 *(.text) 24 *(.text.*) 25 _etext = . ; 26 } 27 .rodata : { 28 _rodata = . ; 29 *(.rodata) /* read-only data */ 30 *(.rodata.*) 31 _erodata = . ; 32 } 33 NOTES 34 .data : { 35 _data = . ; 36 *(.data) 37 *(.data.*) 38 _edata = . ; 39 } 40 41 BOOT_DATA 42 BOOT_DATA_PRESERVED 43 44 /* 45 * This is the BSS section of the decompressor and not of the decompressed Linux kernel. 46 * It will consume place in the decompressor's image. 47 */ 48 . = ALIGN(8); 49 .bss : { 50 _bss = . ; 51 *(.bss) 52 *(.bss.*) 53 *(COMMON) 54 /* 55 * Stacks for the decompressor 56 */ 57 . = ALIGN(PAGE_SIZE); 58 _dump_info_stack_start = .; 59 . += PAGE_SIZE; 60 _dump_info_stack_end = .; 61 . = ALIGN(PAGE_SIZE); 62 _stack_start = .; 63 . += BOOT_STACK_SIZE; 64 _stack_end = .; 65 _ebss = .; 66 } 67 68 /* 69 * uncompressed image info used by the decompressor it should match 70 * struct vmlinux_info. It comes from .vmlinux.info section of 71 * uncompressed vmlinux in a form of info.o 72 */ 73 . = ALIGN(8); 74 .vmlinux.info : { 75 _vmlinux_info = .; 76 *(.vmlinux.info) 77 } 78 79 .decompressor.syms : { 80 . += 1; /* make sure we have \0 before the first entry */ 81 . = ALIGN(2); 82 _decompressor_syms_start = .; 83 *(.decompressor.syms) 84 _decompressor_syms_end = .; 85 } 86 87#ifdef CONFIG_KERNEL_UNCOMPRESSED 88 . = 0x100000; 89#else 90 . = ALIGN(8); 91#endif 92 .rodata.compressed : { 93 _compressed_start = .; 94 *(.vmlinux.bin.compressed) 95 _compressed_end = .; 96 } 97 98#define SB_TRAILER_SIZE 32 99 /* Trailer needed for Secure Boot */ 100 . += SB_TRAILER_SIZE; /* make sure .sb.trailer does not overwrite the previous section */ 101 . = ALIGN(4096) - SB_TRAILER_SIZE; 102 .sb.trailer : { 103 QUAD(0) 104 QUAD(0) 105 QUAD(0) 106 QUAD(0x000000207a49504c) 107 } 108 _end = .; 109 110 /* Sections to be discarded */ 111 /DISCARD/ : { 112 *(.eh_frame) 113 *(__ex_table) 114 *(*__ksymtab*) 115 *(___kcrctab*) 116 } 117} 118