2 * Linker script for gate DSO. The gate pages are an ELF shared object
3 * prelinked to its virtual address, with only one read-only segment and
4 * one execute-only segment (both fit in one page). This script controls
9 #include <asm/system.h>
10 #include "paravirt_patchlist.h"
14 . = GATE_ADDR + SIZEOF_HEADERS;
16 .hash : { *(.hash) } :readable
17 .gnu.hash : { *(.gnu.hash) }
18 .dynsym : { *(.dynsym) }
19 .dynstr : { *(.dynstr) }
20 .gnu.version : { *(.gnu.version) }
21 .gnu.version_d : { *(.gnu.version_d) }
22 .gnu.version_r : { *(.gnu.version_r) }
24 .note : { *(.note*) } :readable :note
26 .dynamic : { *(.dynamic) } :readable :dynamic
29 * This linker script is used both with -r and with -shared. For
30 * the layouts to match, we need to skip more than enough space for
31 * the dynamic symbol table et al. If this amount is insufficient,
32 * ld -shared will barf. Just increase it here.
34 . = GATE_ADDR + 0x600;
37 __paravirt_start_gate_mckinley_e9_patchlist = .;
38 *(.data..patch.mckinley_e9)
39 __paravirt_end_gate_mckinley_e9_patchlist = .;
41 __paravirt_start_gate_vtop_patchlist = .;
43 __paravirt_end_gate_vtop_patchlist = .;
45 __paravirt_start_gate_fsyscall_patchlist = .;
46 *(.data..patch.fsyscall_table)
47 __paravirt_end_gate_fsyscall_patchlist = .;
49 __paravirt_start_gate_brl_fsys_bubble_down_patchlist = .;
50 *(.data..patch.brl_fsys_bubble_down)
51 __paravirt_end_gate_brl_fsys_bubble_down_patchlist = .;
54 .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
55 .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind
56 #ifdef HAVE_BUGGY_SEGREL
57 .text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) } :readable
59 . = ALIGN(PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1));
60 .text : { *(.text) *(.text.*) } :epc
65 *(.data .data.* .gnu.linkonce.d.*)
67 *(.bss .bss.* .gnu.linkonce.b.*)
74 * ld does not recognize this name token; use the constant.
76 #define PT_IA_64_UNWIND 0x70000001
79 * We must supply the ELF program headers explicitly to get just one
80 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
84 readable PT_LOAD FILEHDR PHDRS FLAGS(4); /* PF_R */
85 #ifndef HAVE_BUGGY_SEGREL
86 epc PT_LOAD FILEHDR PHDRS FLAGS(1); /* PF_X */
88 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
89 note PT_NOTE FLAGS(4); /* PF_R */
90 unwind PT_IA_64_UNWIND;
94 * This controls what symbols we export from the DSO.
100 __kernel_syscall_via_break;
101 __kernel_syscall_via_epc;
108 /* The ELF entry point can be used to set the AT_SYSINFO value. */
109 ENTRY(__kernel_syscall_via_epc)