1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Adapted from arm64 version. 4 * 5 * GNU linker script for the VDSO library. 6 * Heavily based on the vDSO linker scripts for other archs. 7 * 8 * Copyright (C) 2012-2018 ARM Limited 9 */ 10 11#include <linux/const.h> 12#include <asm/page.h> 13#include <asm/vdso.h> 14#include <asm-generic/vmlinux.lds.h> 15#include <vdso/datapage.h> 16 17OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") 18OUTPUT_ARCH(arm) 19 20SECTIONS 21{ 22 VDSO_VVAR_SYMS 23 24 . = SIZEOF_HEADERS; 25 26 .hash : { *(.hash) } :text 27 .gnu.hash : { *(.gnu.hash) } 28 .dynsym : { *(.dynsym) } 29 .dynstr : { *(.dynstr) } 30 .gnu.version : { *(.gnu.version) } 31 .gnu.version_d : { *(.gnu.version_d) } 32 .gnu.version_r : { *(.gnu.version_r) } 33 34 .note : { *(.note.*) } :text :note 35 36 .dynamic : { *(.dynamic) } :text :dynamic 37 38 .rodata : { 39 *(.rodata*) 40 *(.got) 41 *(.got.plt) 42 *(.plt) 43 *(.rel.iplt) 44 *(.iplt) 45 *(.igot.plt) 46 } :text 47 48 .text : { 49 *(.text*) 50 *(.glue_7) 51 *(.glue_7t) 52 *(.vfp11_veneer) 53 *(.v4_bx) 54 } :text =0xe7f001f2 55 56 .rel.dyn : { *(.rel*) } 57 58 .ARM.exidx : { *(.ARM.exidx*) } 59 DWARF_DEBUG 60 ELF_DETAILS 61 .ARM.attributes 0 : { *(.ARM.attributes) } 62 63 /DISCARD/ : { 64 *(.note.GNU-stack) 65 *(.data .data.* .gnu.linkonce.d.* .sdata*) 66 *(.bss .sbss .dynbss .dynsbss) 67 } 68} 69 70/* 71 * We must supply the ELF program headers explicitly to get just one 72 * PT_LOAD segment, and set the flags explicitly to make segments read-only. 73 */ 74PHDRS 75{ 76 text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */ 77 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ 78 note PT_NOTE FLAGS(4); /* PF_R */ 79} 80 81VERSION 82{ 83 LINUX_2.6 { 84 global: 85 __vdso_clock_gettime; 86 __vdso_gettimeofday; 87 __vdso_clock_getres; 88 __vdso_clock_gettime64; 89 local: *; 90 }; 91} 92