1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * GNU linker script for the VDSO library. 4 * 5 * Copyright (C) 2012 ARM Limited 6 * 7 * Author: Will Deacon <will.deacon@arm.com> 8 * Heavily based on the vDSO linker scripts fo 9 */ 10 11 #include <linux/const.h> 12 #include <asm/page.h> 13 #include <asm/vdso.h> 14 #include <asm/vdso/vsyscall.h> 15 #include <asm-generic/vmlinux.lds.h> 16 #include <vdso/datapage.h> 17 18 OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bi 19 OUTPUT_ARCH(aarch64) 20 21 SECTIONS 22 { 23 PROVIDE(_vdso_data = . - __VVAR_PAGES 24 PROVIDE(_vdso_rng_data = _vdso_data + 25 #ifdef CONFIG_TIME_NS 26 PROVIDE(_timens_data = _vdso_data + PA 27 #endif 28 . = VDSO_LBASE + SIZEOF_HEADERS; 29 30 .hash : { *(.hash) } 31 .gnu.hash : { *(.gnu.hash) } 32 .dynsym : { *(.dynsym) } 33 .dynstr : { *(.dynstr) } 34 .gnu.version : { *(.gnu.version) } 35 .gnu.version_d : { *(.gnu.version_d) 36 .gnu.version_r : { *(.gnu.version_r) 37 38 /* 39 * Discard .note.gnu.property sections 40 * different alignment requirement fro 41 */ 42 /DISCARD/ : { 43 *(.note.GNU-stack .note.gnu.pr 44 } 45 .note : { *(.note.*) } 46 47 . = ALIGN(16); 48 49 .text : { *(.text*) } 50 PROVIDE (__etext = .); 51 PROVIDE (_etext = .); 52 PROVIDE (etext = .); 53 54 . = ALIGN(4); 55 .altinstructions : { 56 *(.altinstructions) 57 } 58 59 .dynamic : { *(.dynamic) } 60 61 .rela.dyn : ALIGN(8) { *(.rela . 62 63 .rodata : { 64 *(.rodata*) 65 *(.got) 66 *(.got.plt) 67 *(.plt) 68 *(.plt.*) 69 *(.iplt) 70 *(.igot .igot.plt) 71 } 72 73 _end = .; 74 PROVIDE(end = .); 75 76 DWARF_DEBUG 77 ELF_DETAILS 78 79 /DISCARD/ : { 80 *(.data .data.* .gnu.linkonce. 81 *(.bss .sbss .dynbss .dynsbss) 82 *(.eh_frame .eh_frame_hdr) 83 } 84 } 85 86 /* 87 * We must supply the ELF program headers expl 88 * PT_LOAD segment, and set the flags explicit 89 */ 90 PHDRS 91 { 92 text PT_LOAD FLAGS( 93 dynamic PT_DYNAMIC FLAGS( 94 note PT_NOTE FLAGS( 95 } 96 97 /* 98 * This controls what symbols we export from t 99 */ 100 VERSION 101 { 102 LINUX_2.6.39 { 103 global: 104 __kernel_rt_sigreturn; 105 __kernel_gettimeofday; 106 __kernel_clock_gettime; 107 __kernel_clock_getres; 108 __kernel_getrandom; 109 local: *; 110 }; 111 } 112 113 /* 114 * Make the sigreturn code visible to the kern 115 */ 116 VDSO_sigtramp = __kernel_rt_sigretur
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.