aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/gate.lds.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/ia64/kernel/gate.lds.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/ia64/kernel/gate.lds.S')
-rw-r--r--arch/ia64/kernel/gate.lds.S95
1 files changed, 95 insertions, 0 deletions
diff --git a/arch/ia64/kernel/gate.lds.S b/arch/ia64/kernel/gate.lds.S
new file mode 100644
index 000000000000..e1e4aba9ecd0
--- /dev/null
+++ b/arch/ia64/kernel/gate.lds.S
@@ -0,0 +1,95 @@
1/*
2 * Linker script for gate DSO. The gate pages are an ELF shared object prelinked to its
3 * virtual address, with only one read-only segment and one execute-only segment (both fit
4 * in one page). This script controls its layout.
5 */
6
7#include <linux/config.h>
8
9#include <asm/system.h>
10
11SECTIONS
12{
13 . = GATE_ADDR + SIZEOF_HEADERS;
14
15 .hash : { *(.hash) } :readable
16 .dynsym : { *(.dynsym) }
17 .dynstr : { *(.dynstr) }
18 .gnu.version : { *(.gnu.version) }
19 .gnu.version_d : { *(.gnu.version_d) }
20 .gnu.version_r : { *(.gnu.version_r) }
21 .dynamic : { *(.dynamic) } :readable :dynamic
22
23 /*
24 * This linker script is used both with -r and with -shared. For the layouts to match,
25 * we need to skip more than enough space for the dynamic symbol table et al. If this
26 * amount is insufficient, ld -shared will barf. Just increase it here.
27 */
28 . = GATE_ADDR + 0x500;
29
30 .data.patch : {
31 __start_gate_mckinley_e9_patchlist = .;
32 *(.data.patch.mckinley_e9)
33 __end_gate_mckinley_e9_patchlist = .;
34
35 __start_gate_vtop_patchlist = .;
36 *(.data.patch.vtop)
37 __end_gate_vtop_patchlist = .;
38
39 __start_gate_fsyscall_patchlist = .;
40 *(.data.patch.fsyscall_table)
41 __end_gate_fsyscall_patchlist = .;
42
43 __start_gate_brl_fsys_bubble_down_patchlist = .;
44 *(.data.patch.brl_fsys_bubble_down)
45 __end_gate_brl_fsys_bubble_down_patchlist = .;
46 } :readable
47 .IA_64.unwind_info : { *(.IA_64.unwind_info*) }
48 .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind
49#ifdef HAVE_BUGGY_SEGREL
50 .text (GATE_ADDR + PAGE_SIZE) : { *(.text) *(.text.*) } :readable
51#else
52 . = ALIGN (PERCPU_PAGE_SIZE) + (. & (PERCPU_PAGE_SIZE - 1));
53 .text : { *(.text) *(.text.*) } :epc
54#endif
55
56 /DISCARD/ : {
57 *(.got.plt) *(.got)
58 *(.data .data.* .gnu.linkonce.d.*)
59 *(.dynbss)
60 *(.bss .bss.* .gnu.linkonce.b.*)
61 *(__ex_table)
62 }
63}
64
65/*
66 * We must supply the ELF program headers explicitly to get just one
67 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
68 */
69PHDRS
70{
71 readable PT_LOAD FILEHDR PHDRS FLAGS(4); /* PF_R */
72#ifndef HAVE_BUGGY_SEGREL
73 epc PT_LOAD FILEHDR PHDRS FLAGS(1); /* PF_X */
74#endif
75 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
76 unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */
77}
78
79/*
80 * This controls what symbols we export from the DSO.
81 */
82VERSION
83{
84 LINUX_2.5 {
85 global:
86 __kernel_syscall_via_break;
87 __kernel_syscall_via_epc;
88 __kernel_sigtramp;
89
90 local: *;
91 };
92}
93
94/* The ELF entry point can be used to set the AT_SYSINFO value. */
95ENTRY(__kernel_syscall_via_epc)