arch/mips/vdso/vdso.lds.S

Source file repositories/reference/linux-study-clean/arch/mips/vdso/vdso.lds.S

File Facts

System
Linux kernel
Corpus path
arch/mips/vdso/vdso.lds.S
Extension
.S
Size
2705 bytes
Lines
111
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: arch/mips
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/sgidefs.h>
#include <asm/vdso/vdso.h>
#include <vdso/datapage.h>

#if _MIPS_SIM == _MIPS_SIM_ABI64
OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradbigmips", "elf64-tradlittlemips")
#elif _MIPS_SIM == _MIPS_SIM_NABI32
OUTPUT_FORMAT("elf32-ntradlittlemips", "elf32-ntradbigmips", "elf32-ntradlittlemips")
#else
OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips")
#endif

OUTPUT_ARCH(mips)

SECTIONS
{
	VDSO_VVAR_SYMS

	. = SIZEOF_HEADERS;

	/*
	 * In order to retain compatibility with older toolchains we provide the
	 * ABI flags section ourself. Newer assemblers will automatically
	 * generate .MIPS.abiflags sections so we discard such input sections,
	 * and then manually define our own section here. genvdso will patch
	 * this section to have the correct name/type.
	 */
	.mips_abiflags	: { *(.mips_abiflags) } 	:text :abiflags

	.reginfo	: { *(.reginfo) }		:text :reginfo

	.hash		: { *(.hash) }			:text
	.gnu.hash	: { *(.gnu.hash) }
	.dynsym		: { *(.dynsym) }
	.dynstr		: { *(.dynstr) }
	.gnu.version	: { *(.gnu.version) }
	.gnu.version_d	: { *(.gnu.version_d) }
	.gnu.version_r	: { *(.gnu.version_r) }

	.note		: { *(.note.*) }		:text :note

	.text		: { *(.text*) }			:text
	PROVIDE (__etext = .);
	PROVIDE (_etext = .);
	PROVIDE (etext = .);

	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text :eh_frame_hdr
	.eh_frame	: { KEEP (*(.eh_frame)) }	:text

	.dynamic	: { *(.dynamic) }		:text :dynamic

	.rodata		: { *(.rodata*) }		:text
	.got		: { *(.got) }

	_end = .;
	PROVIDE(end = .);

	/DISCARD/	: {
		*(.MIPS.abiflags)
		*(.gnu.attributes)
		*(.note.GNU-stack)
		*(.data .data.* .gnu.linkonce.d.* .sdata*)
		*(.bss .sbss .dynbss .dynsbss)
	}
}

PHDRS
{
	/*
	 * Provide a PT_MIPS_ABIFLAGS header to assign the ABI flags section

Annotation

Implementation Notes