1/* 2 * Copyright 2012 Tilera Corporation. All Rights Reserved. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation, version 2. 7 * 8 * This program is distributed in the hope that it will be useful, but 9 * WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or 11 * NON INFRINGEMENT. See the GNU General Public License for 12 * more details. 13 */ 14 15#define VDSO_VERSION_STRING LINUX_2.6 16 17 18OUTPUT_ARCH(tile) 19 20/* The ELF entry point can be used to set the AT_SYSINFO value. */ 21ENTRY(__vdso_rt_sigreturn); 22 23 24SECTIONS 25{ 26 . = SIZEOF_HEADERS; 27 28 .hash : { *(.hash) } :text 29 .gnu.hash : { *(.gnu.hash) } 30 .dynsym : { *(.dynsym) } 31 .dynstr : { *(.dynstr) } 32 .gnu.version : { *(.gnu.version) } 33 .gnu.version_d : { *(.gnu.version_d) } 34 .gnu.version_r : { *(.gnu.version_r) } 35 36 .note : { *(.note.*) } :text :note 37 .dynamic : { *(.dynamic) } :text :dynamic 38 39 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr 40 .eh_frame : { KEEP (*(.eh_frame)) } :text 41 42 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 43 44 /* 45 * This linker script is used both with -r and with -shared. 46 * For the layouts to match, we need to skip more than enough 47 * space for the dynamic symbol table et al. If this amount 48 * is insufficient, ld -shared will barf. Just increase it here. 49 */ 50 . = 0x1000; 51 .text : { *(.text .text.*) } :text 52 53 .data : { 54 *(.got.plt) *(.got) 55 *(.data .data.* .gnu.linkonce.d.*) 56 *(.dynbss) 57 *(.bss .bss.* .gnu.linkonce.b.*) 58 } 59} 60 61 62/* 63 * We must supply the ELF program headers explicitly to get just one 64 * PT_LOAD segment, and set the flags explicitly to make segments read-only. 65 */ 66PHDRS 67{ 68 text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */ 69 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ 70 note PT_NOTE FLAGS(4); /* PF_R */ 71 eh_frame_hdr PT_GNU_EH_FRAME; 72} 73 74 75/* 76 * This controls what userland symbols we export from the vDSO. 77 */ 78VERSION 79{ 80 VDSO_VERSION_STRING { 81 global: 82 __vdso_rt_sigreturn; 83 __vdso_gettimeofday; 84 gettimeofday; 85 __vdso_clock_gettime; 86 clock_gettime; 87 local:*; 88 }; 89} 90