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