arch/x86/boot/compressed/vmlinux.lds.S

Source file repositories/reference/linux-study-clean/arch/x86/boot/compressed/vmlinux.lds.S

File Facts

System
Linux kernel
Corpus path
arch/x86/boot/compressed/vmlinux.lds.S
Extension
.S
Size
2308 bytes
Lines
129
Domain
Architecture Layer
Bucket
arch/x86
Inferred role
Architecture Layer: arch/x86
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <asm-generic/vmlinux.lds.h>

OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT)

#undef i386

#include <asm/cache.h>
#include <asm/page_types.h>

#ifdef CONFIG_X86_64
OUTPUT_ARCH(i386:x86-64)
ENTRY(startup_64)
#else
OUTPUT_ARCH(i386)
ENTRY(startup_32)
#endif

SECTIONS
{
	/* Be careful parts of head_64.S assume startup_32 is at
	 * address 0.
	 */
	. = 0;
	.head.text : {
		_head = . ;
		HEAD_TEXT
		_ehead = . ;
	}
	.rodata..compressed : {
		*(.rodata..compressed)
	}
	.text :	{
		_text = .; 	/* Text */
		*(.text)
		*(.text.*)
		*(.noinstr.text)
		_etext = . ;
	}
	.rodata : {
		_rodata = . ;
		*(.rodata)	 /* read-only data */
		*(.rodata.*)
		_erodata = . ;
	}
#ifdef CONFIG_EFI_SBAT
	.sbat : ALIGN(0x1000) {
		_sbat = . ;
		*(.sbat)
		_esbat = ALIGN(0x1000);
		. = _esbat;
	}
#endif
	.data :	ALIGN(0x1000) {
		_data = . ;
		*(.data)
		*(.data.*)

		/* Add 4 bytes of extra space for the obsolete CRC-32 checksum */
		. = ALIGN(. + 4, 0x200);
		_edata = . ;
	}
	. = ALIGN(L1_CACHE_BYTES);
	.bss : {
		_bss = . ;
		*(.bss)
		*(.bss.*)
		*(COMMON)
		. = ALIGN(8);	/* For convenience during zeroing */
		_ebss = .;
	}

Annotation

Implementation Notes