2 * Linker script for vDSO. This is an ELF shared object prelinked to
3 * its virtual address, and with only one read-only segment.
4 * This script controls its layout.
10 #include <asm/vdso32.h>
12 hpet_page = . - VDSO_OFFSET(VDSO_HPET_PAGE);
14 vvar = . - VDSO_OFFSET(VDSO_VVAR_PAGE);
16 /* Place all vvars at the offsets in asm/vvar.h. */
17 #define EMIT_VVAR(name, offset) vvar_ ## name = vvar + offset;
18 #define __VVAR_KERNEL_LDS
20 #undef __VVAR_KERNEL_LDS
25 .hash : { *(.hash) } :text
26 .gnu.hash : { *(.gnu.hash) }
27 .dynsym : { *(.dynsym) }
28 .dynstr : { *(.dynstr) }
29 .gnu.version : { *(.gnu.version) }
30 .gnu.version_d : { *(.gnu.version_d) }
31 .gnu.version_r : { *(.gnu.version_r) }
33 .note : { *(.note.*) } :text :note
35 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
36 .eh_frame : { KEEP (*(.eh_frame)) } :text
38 .dynamic : { *(.dynamic) } :text :dynamic
40 .rodata : { *(.rodata*) } :text
51 .altinstructions : { *(.altinstructions) }
52 .altinstr_replacement : { *(.altinstr_replacement) }
55 * Align the actual code well away from the non-instruction data.
56 * This is the best thing for the I-cache.
60 .text : { *(.text*) } :text =0x90909090,
63 * The comma above works around a bug in gold:
64 * https://sourceware.org/bugzilla/show_bug.cgi?id=16804
74 * Very old versions of ld do not recognize this name token; use the constant.
76 #define PT_GNU_EH_FRAME 0x6474e550
79 * We must supply the ELF program headers explicitly to get just one
80 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
84 text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
85 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
86 note PT_NOTE FLAGS(4); /* PF_R */
87 eh_frame_hdr PT_GNU_EH_FRAME;