Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Adapted from arm64 version.
0004  *
0005  * GNU linker script for the VDSO library.
0006  *
0007  * Copyright (C) 2012 ARM Limited
0008  *
0009  * Author: Will Deacon <will.deacon@arm.com>
0010  * Heavily based on the vDSO linker scripts for other archs.
0011  */
0012 
0013 #include <linux/const.h>
0014 #include <asm/page.h>
0015 #include <asm/vdso.h>
0016 
0017 OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
0018 OUTPUT_ARCH(arm)
0019 
0020 SECTIONS
0021 {
0022     PROVIDE(_start = .);
0023 
0024     . = SIZEOF_HEADERS;
0025 
0026     .hash       : { *(.hash) }          :text
0027     .gnu.hash   : { *(.gnu.hash) }
0028     .dynsym     : { *(.dynsym) }
0029     .dynstr     : { *(.dynstr) }
0030     .gnu.version    : { *(.gnu.version) }
0031     .gnu.version_d  : { *(.gnu.version_d) }
0032     .gnu.version_r  : { *(.gnu.version_r) }
0033 
0034     .note       : { *(.note.*) }        :text   :note
0035 
0036 
0037     .eh_frame_hdr   : { *(.eh_frame_hdr) }      :text   :eh_frame_hdr
0038     .eh_frame   : { KEEP (*(.eh_frame)) }   :text
0039 
0040     .dynamic    : { *(.dynamic) }       :text   :dynamic
0041 
0042     .rodata     : { *(.rodata*) }       :text
0043 
0044     .text       : { *(.text*) }         :text   =0xe7f001f2
0045 
0046     .got        : { *(.got) }
0047     .rel.plt    : { *(.rel.plt) }
0048 
0049     /DISCARD/   : {
0050         *(.note.GNU-stack)
0051         *(.data .data.* .gnu.linkonce.d.* .sdata*)
0052         *(.bss .sbss .dynbss .dynsbss)
0053     }
0054 }
0055 
0056 /*
0057  * We must supply the ELF program headers explicitly to get just one
0058  * PT_LOAD segment, and set the flags explicitly to make segments read-only.
0059  */
0060 PHDRS
0061 {
0062     text        PT_LOAD     FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */
0063     dynamic     PT_DYNAMIC  FLAGS(4);       /* PF_R */
0064     note        PT_NOTE     FLAGS(4);       /* PF_R */
0065     eh_frame_hdr    PT_GNU_EH_FRAME;
0066 }
0067 
0068 VERSION
0069 {
0070     LINUX_2.6 {
0071     global:
0072         __vdso_clock_gettime;
0073         __vdso_gettimeofday;
0074         __vdso_clock_getres;
0075         __vdso_clock_gettime64;
0076     local: *;
0077     };
0078 }