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>
13 . = GATE_ADDR + SIZEOF_HEADERS;
15 .hash : { *(.hash) } :readable
16 .gnu.hash : { *(.gnu.hash) }
17 .dynsym : { *(.dynsym) }
18 .dynstr : { *(.dynstr) }
19 .gnu.version : { *(.gnu.version) }
20 .gnu.version_d : { *(.gnu.version_d) }
21 .gnu.version_r : { *(.gnu.version_r) }
23 .dynamic : { *(.dynamic) } :readable :dynamic
26 * This linker script is used both with -r and with -shared. For
27 * the layouts to match, we need to skip more than enough space for
28 * the dynamic symbol table et al. If this amount is insufficient,
29 * ld -shared will barf. Just increase it here.
31 . = GATE_ADDR + 0x500;
34 __start_gate_mckinley_e9_patchlist = .;
35 *(.data.patch.mckinley_e9)
36 __end_gate_mckinley_e9_patchlist = .;
38 __start_gate_vtop_patchlist = .;
40 __end_gate_vtop_patchlist = .;
42 __start_gate_fsyscall_patchlist = .;
43 *(.data.patch.fsyscall_table)
44 __end_gate_fsyscall_patchlist = .;
46 __start_gate_brl_fsys_bubble_down_patchlist = .;
47 *(.data.patch.brl_fsys_bubble_down)
48 __end_gate_brl_fsys_bubble_down_patchlist = .;
51 .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
52 .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind
53 #ifdef HAVE_BUGGY_SEGREL
54 .text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) } :readable
56 . = ALIGN(PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1));
57 .text : { *(.text) *(.text.*) } :epc
62 *(.data .data.* .gnu.linkonce.d.*)
64 *(.bss .bss.* .gnu.linkonce.b.*)
71 * ld does not recognize this name token; use the constant.
73 #define PT_IA_64_UNWIND 0x70000001
76 * We must supply the ELF program headers explicitly to get just one
77 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
81 readable PT_LOAD FILEHDR PHDRS FLAGS(4); /* PF_R */
82 #ifndef HAVE_BUGGY_SEGREL
83 epc PT_LOAD FILEHDR PHDRS FLAGS(1); /* PF_X */
85 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
86 unwind PT_IA_64_UNWIND;
90 * This controls what symbols we export from the DSO.
96 __kernel_syscall_via_break;
97 __kernel_syscall_via_epc;
104 /* The ELF entry point can be used to set the AT_SYSINFO value. */
105 ENTRY(__kernel_syscall_via_epc)