Path: blob/master/arch/x86/boot/compressed/vmlinux.lds.S
26481 views
/* SPDX-License-Identifier: GPL-2.0 */1#include <asm-generic/vmlinux.lds.h>23OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT)45#undef i38667#include <asm/cache.h>8#include <asm/page_types.h>910#ifdef CONFIG_X86_6411OUTPUT_ARCH(i386:x86-64)12ENTRY(startup_64)13#else14OUTPUT_ARCH(i386)15ENTRY(startup_32)16#endif1718SECTIONS19{20/* Be careful parts of head_64.S assume startup_32 is at21* address 0.22*/23. = 0;24.head.text : {25_head = . ;26HEAD_TEXT27_ehead = . ;28}29.rodata..compressed : {30*(.rodata..compressed)31}32.text : {33_text = .; /* Text */34*(.text)35*(.text.*)36*(.noinstr.text)37_etext = . ;38}39.rodata : {40_rodata = . ;41*(.rodata) /* read-only data */42*(.rodata.*)43_erodata = . ;44}45#ifdef CONFIG_EFI_SBAT46.sbat : ALIGN(0x1000) {47_sbat = . ;48*(.sbat)49_esbat = ALIGN(0x1000);50. = _esbat;51}52#endif53.data : ALIGN(0x1000) {54_data = . ;55*(.data)56*(.data.*)5758/* Add 4 bytes of extra space for the obsolete CRC-32 checksum */59. = ALIGN(. + 4, 0x200);60_edata = . ;61}62. = ALIGN(L1_CACHE_BYTES);63.bss : {64_bss = . ;65*(.bss)66*(.bss.*)67*(COMMON)68. = ALIGN(8); /* For convenience during zeroing */69_ebss = .;70}71#ifdef CONFIG_X86_6472. = ALIGN(PAGE_SIZE);73.pgtable : {74_pgtable = . ;75*(.pgtable)76_epgtable = . ;77}78#endif79. = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */80_end = .;8182STABS_DEBUG83DWARF_DEBUG84ELF_DETAILS8586DISCARDS87/DISCARD/ : {88*(.dynamic) *(.dynsym) *(.dynstr) *(.dynbss)89*(.hash) *(.gnu.hash)90*(.note.*)91}9293.got.plt (INFO) : {94*(.got.plt)95}96ASSERT(SIZEOF(.got.plt) == 0 ||97#ifdef CONFIG_X86_6498SIZEOF(.got.plt) == 0x18,99#else100SIZEOF(.got.plt) == 0xc,101#endif102"Unexpected GOT/PLT entries detected!")103104/*105* Sections that should stay zero sized, which is safer to106* explicitly check instead of blindly discarding.107*/108.got : {109*(.got)110}111ASSERT(SIZEOF(.got) == 0, "Unexpected GOT entries detected!")112113.plt : {114*(.plt) *(.plt.*)115}116ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")117118.rel.dyn : {119*(.rel.*) *(.rel_*)120}121ASSERT(SIZEOF(.rel.dyn) == 0, "Unexpected run-time relocations (.rel) detected!")122123.rela.dyn : {124*(.rela.*) *(.rela_*)125}126ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!")127}128129130