Path: blob/master/arch/x86/entry/vdso/vdso-layout.lds.S
26493 views
/* SPDX-License-Identifier: GPL-2.0 */1#include <asm/vdso.h>2#include <asm/vdso/vsyscall.h>3#include <vdso/datapage.h>45/*6* Linker script for vDSO. This is an ELF shared object prelinked to7* its virtual address, and with only one read-only segment.8* This script controls its layout.9*/1011SECTIONS12{13/*14* User/kernel shared data is before the vDSO. This may be a little15* uglier than putting it after the vDSO, but it avoids issues with16* non-allocatable things that dangle past the end of the PT_LOAD17* segment.18*/1920VDSO_VVAR_SYMS2122vclock_pages = VDSO_VCLOCK_PAGES_START(vdso_u_data);23pvclock_page = vclock_pages + VDSO_PAGE_PVCLOCK_OFFSET * PAGE_SIZE;24hvclock_page = vclock_pages + VDSO_PAGE_HVCLOCK_OFFSET * PAGE_SIZE;2526. = SIZEOF_HEADERS;2728.hash : { *(.hash) } :text29.gnu.hash : { *(.gnu.hash) }30.dynsym : { *(.dynsym) }31.dynstr : { *(.dynstr) }32.gnu.version : { *(.gnu.version) }33.gnu.version_d : { *(.gnu.version_d) }34.gnu.version_r : { *(.gnu.version_r) }3536.dynamic : { *(.dynamic) } :text :dynamic3738.rodata : {39*(.rodata*)40*(.data*)41*(.sdata*)42*(.got.plt) *(.got)43*(.gnu.linkonce.d.*)44*(.bss*)45*(.dynbss*)46*(.gnu.linkonce.b.*)47} :text4849/*50* Discard .note.gnu.property sections which are unused and have51* different alignment requirement from vDSO note sections.52*/53/DISCARD/ : {54*(.note.gnu.property)55}56.note : { *(.note.*) } :text :note5758.eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr59.eh_frame : { KEEP (*(.eh_frame)) } :text606162/*63* Text is well-separated from actual data: there's plenty of64* stuff that isn't used at runtime in between.65*/6667.text : {68*(.text*)69} :text =0x90909090,70717273.altinstructions : { *(.altinstructions) } :text74.altinstr_replacement : { *(.altinstr_replacement) } :text7576__ex_table : { *(__ex_table) } :text7778/DISCARD/ : {79*(.discard)80*(.discard.*)81*(__bug_table)82}83}8485/*86* Very old versions of ld do not recognize this name token; use the constant.87*/88#define PT_GNU_EH_FRAME 0x6474e5508990/*91* We must supply the ELF program headers explicitly to get just one92* PT_LOAD segment, and set the flags explicitly to make segments read-only.93*/94PHDRS95{96text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */97dynamic PT_DYNAMIC FLAGS(4); /* PF_R */98note PT_NOTE FLAGS(4); /* PF_R */99eh_frame_hdr PT_GNU_EH_FRAME;100}101102103