1/* SPDX-License-Identifier: GPL-2.0 */ 2#include <asm-generic/vmlinux.lds.h> 3 4OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT) 5 6#undef i386 7 8#include <asm/cache.h> 9#include <asm/page_types.h> 10 11#ifdef CONFIG_X86_64 12OUTPUT_ARCH(i386:x86-64) 13ENTRY(startup_64) 14#else 15OUTPUT_ARCH(i386) 16ENTRY(startup_32) 17#endif 18 19SECTIONS 20{ 21 /* Be careful parts of head_64.S assume startup_32 is at 22 * address 0. 23 */ 24 . = 0; 25 .head.text : { 26 _head = . ; 27 HEAD_TEXT 28 _ehead = . ; 29 } 30 .rodata..compressed : { 31 *(.rodata..compressed) 32 } 33 .text : { 34 _text = .; /* Text */ 35 *(.text) 36 *(.text.*) 37 _etext = . ; 38 } 39 .rodata : { 40 _rodata = . ; 41 *(.rodata) /* read-only data */ 42 *(.rodata.*) 43 _erodata = . ; 44 } 45 .got : { 46 _got = .; 47 KEEP(*(.got.plt)) 48 KEEP(*(.got)) 49 _egot = .; 50 } 51 .data : { 52 _data = . ; 53 *(.data) 54 *(.data.*) 55 *(.bss.efistub) 56 _edata = . ; 57 } 58 . = ALIGN(L1_CACHE_BYTES); 59 .bss : { 60 _bss = . ; 61 *(.bss) 62 *(.bss.*) 63 *(COMMON) 64 . = ALIGN(8); /* For convenience during zeroing */ 65 _ebss = .; 66 } 67#ifdef CONFIG_X86_64 68 . = ALIGN(PAGE_SIZE); 69 .pgtable : { 70 _pgtable = . ; 71 *(.pgtable) 72 _epgtable = . ; 73 } 74#endif 75 . = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */ 76 _end = .; 77 78 DISCARDS 79} 80