aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/kprobes.c2
-rw-r--r--arch/powerpc/kernel/ptrace.c4
-rw-r--r--arch/powerpc/kernel/setup-common.c20
-rw-r--r--arch/powerpc/kernel/setup_64.c3
-rw-r--r--arch/powerpc/kernel/smp.c4
-rw-r--r--arch/powerpc/kernel/vdso32/vdso32.lds.S219
-rw-r--r--arch/powerpc/kernel/vdso64/vdso64.lds.S225
7 files changed, 263 insertions, 214 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 440f5a87271f..5338e4855712 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -38,6 +38,8 @@
38DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 38DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
39DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 39DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
40 40
41struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}};
42
41int __kprobes arch_prepare_kprobe(struct kprobe *p) 43int __kprobes arch_prepare_kprobe(struct kprobe *p)
42{ 44{
43 int ret = 0; 45 int ret = 0;
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index cf7732cdd6c7..3e17d154d0d4 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -505,10 +505,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
505 ret = ptrace_set_debugreg(child, addr, data); 505 ret = ptrace_set_debugreg(child, addr, data);
506 break; 506 break;
507 507
508 case PTRACE_DETACH:
509 ret = ptrace_detach(child, data);
510 break;
511
512#ifdef CONFIG_PPC64 508#ifdef CONFIG_PPC64
513 case PTRACE_GETREGS64: 509 case PTRACE_GETREGS64:
514#endif 510#endif
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 36c90ba2d312..2de00f870edc 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -413,16 +413,28 @@ void __init smp_setup_cpu_maps(void)
413 of_node_put(dn); 413 of_node_put(dn);
414 } 414 }
415 415
416 vdso_data->processorCount = num_present_cpus();
417#endif /* CONFIG_PPC64 */
418}
419
420/*
421 * Being that cpu_sibling_map is now a per_cpu array, then it cannot
422 * be initialized until the per_cpu areas have been created. This
423 * function is now called from setup_per_cpu_areas().
424 */
425void __init smp_setup_cpu_sibling_map(void)
426{
427#if defined(CONFIG_PPC64)
428 int cpu;
429
416 /* 430 /*
417 * Do the sibling map; assume only two threads per processor. 431 * Do the sibling map; assume only two threads per processor.
418 */ 432 */
419 for_each_possible_cpu(cpu) { 433 for_each_possible_cpu(cpu) {
420 cpu_set(cpu, cpu_sibling_map[cpu]); 434 cpu_set(cpu, per_cpu(cpu_sibling_map, cpu));
421 if (cpu_has_feature(CPU_FTR_SMT)) 435 if (cpu_has_feature(CPU_FTR_SMT))
422 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); 436 cpu_set(cpu ^ 0x1, per_cpu(cpu_sibling_map, cpu));
423 } 437 }
424
425 vdso_data->processorCount = num_present_cpus();
426#endif /* CONFIG_PPC64 */ 438#endif /* CONFIG_PPC64 */
427} 439}
428#endif /* CONFIG_SMP */ 440#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 008ab6823b02..0e014550b83f 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -597,6 +597,9 @@ void __init setup_per_cpu_areas(void)
597 paca[i].data_offset = ptr - __per_cpu_start; 597 paca[i].data_offset = ptr - __per_cpu_start;
598 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); 598 memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
599 } 599 }
600
601 /* Now that per_cpu is setup, initialize cpu_sibling_map */
602 smp_setup_cpu_sibling_map();
600} 603}
601#endif 604#endif
602 605
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index d30f08fa0297..338950aeb6f6 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -61,11 +61,11 @@ struct thread_info *secondary_ti;
61 61
62cpumask_t cpu_possible_map = CPU_MASK_NONE; 62cpumask_t cpu_possible_map = CPU_MASK_NONE;
63cpumask_t cpu_online_map = CPU_MASK_NONE; 63cpumask_t cpu_online_map = CPU_MASK_NONE;
64cpumask_t cpu_sibling_map[NR_CPUS] = { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; 64DEFINE_PER_CPU(cpumask_t, cpu_sibling_map) = CPU_MASK_NONE;
65 65
66EXPORT_SYMBOL(cpu_online_map); 66EXPORT_SYMBOL(cpu_online_map);
67EXPORT_SYMBOL(cpu_possible_map); 67EXPORT_SYMBOL(cpu_possible_map);
68EXPORT_SYMBOL(cpu_sibling_map); 68EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
69 69
70/* SMP operations for this machine */ 70/* SMP operations for this machine */
71struct smp_ops_t *smp_ops; 71struct smp_ops_t *smp_ops;
diff --git a/arch/powerpc/kernel/vdso32/vdso32.lds.S b/arch/powerpc/kernel/vdso32/vdso32.lds.S
index 26e138c4ce17..9352ab5200e5 100644
--- a/arch/powerpc/kernel/vdso32/vdso32.lds.S
+++ b/arch/powerpc/kernel/vdso32/vdso32.lds.S
@@ -1,130 +1,147 @@
1
2/* 1/*
3 * This is the infamous ld script for the 32 bits vdso 2 * This is the infamous ld script for the 32 bits vdso
4 * library 3 * library
5 */ 4 */
6#include <asm/vdso.h> 5#include <asm/vdso.h>
7 6
8/* Default link addresses for the vDSOs */
9OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") 7OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
10OUTPUT_ARCH(powerpc:common) 8OUTPUT_ARCH(powerpc:common)
11ENTRY(_start) 9ENTRY(_start)
12 10
13SECTIONS 11SECTIONS
14{ 12{
15 . = VDSO32_LBASE + SIZEOF_HEADERS; 13 . = VDSO32_LBASE + SIZEOF_HEADERS;
16 .hash : { *(.hash) } :text 14
17 .gnu.hash : { *(.gnu.hash) } 15 .hash : { *(.hash) } :text
18 .dynsym : { *(.dynsym) } 16 .gnu.hash : { *(.gnu.hash) }
19 .dynstr : { *(.dynstr) } 17 .dynsym : { *(.dynsym) }
20 .gnu.version : { *(.gnu.version) } 18 .dynstr : { *(.dynstr) }
21 .gnu.version_d : { *(.gnu.version_d) } 19 .gnu.version : { *(.gnu.version) }
22 .gnu.version_r : { *(.gnu.version_r) } 20 .gnu.version_d : { *(.gnu.version_d) }
23 21 .gnu.version_r : { *(.gnu.version_r) }
24 .note : { *(.note.*) } :text :note 22
25 23 .note : { *(.note.*) } :text :note
26 . = ALIGN (16); 24
27 .text : 25 . = ALIGN(16);
28 { 26 .text : {
29 *(.text .stub .text.* .gnu.linkonce.t.*) 27 *(.text .stub .text.* .gnu.linkonce.t.*)
30 } 28 }
31 PROVIDE (__etext = .); 29 PROVIDE(__etext = .);
32 PROVIDE (_etext = .); 30 PROVIDE(_etext = .);
33 PROVIDE (etext = .); 31 PROVIDE(etext = .);
34 32
35 . = ALIGN(8); 33 . = ALIGN(8);
36 __ftr_fixup : { 34 __ftr_fixup : { *(__ftr_fixup) }
37 *(__ftr_fixup)
38 }
39 35
40#ifdef CONFIG_PPC64 36#ifdef CONFIG_PPC64
41 . = ALIGN(8); 37 . = ALIGN(8);
42 __fw_ftr_fixup : { 38 __fw_ftr_fixup : { *(__fw_ftr_fixup) }
43 *(__fw_ftr_fixup)
44 }
45#endif 39#endif
46 40
47 /* Other stuff is appended to the text segment: */ 41 /*
48 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 42 * Other stuff is appended to the text segment:
49 .rodata1 : { *(.rodata1) } 43 */
50 44 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
51 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr 45 .rodata1 : { *(.rodata1) }
52 .eh_frame : { KEEP (*(.eh_frame)) } :text 46
53 .gcc_except_table : { *(.gcc_except_table) } 47 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
54 .fixup : { *(.fixup) } 48 .eh_frame : { KEEP (*(.eh_frame)) } :text
55 49 .gcc_except_table : { *(.gcc_except_table) }
56 .dynamic : { *(.dynamic) } :text :dynamic 50 .fixup : { *(.fixup) }
57 .got : { *(.got) } 51
58 .plt : { *(.plt) } 52 .dynamic : { *(.dynamic) } :text :dynamic
59 53 .got : { *(.got) }
60 _end = .; 54 .plt : { *(.plt) }
61 __end = .; 55
62 PROVIDE (end = .); 56 _end = .;
63 57 __end = .;
64 58 PROVIDE(end = .);
65 /* Stabs debugging sections are here too 59
66 */ 60 /*
67 .stab 0 : { *(.stab) } 61 * Stabs debugging sections are here too.
68 .stabstr 0 : { *(.stabstr) } 62 */
69 .stab.excl 0 : { *(.stab.excl) } 63 .stab 0 : { *(.stab) }
70 .stab.exclstr 0 : { *(.stab.exclstr) } 64 .stabstr 0 : { *(.stabstr) }
71 .stab.index 0 : { *(.stab.index) } 65 .stab.excl 0 : { *(.stab.excl) }
72 .stab.indexstr 0 : { *(.stab.indexstr) } 66 .stab.exclstr 0 : { *(.stab.exclstr) }
73 .comment 0 : { *(.comment) } 67 .stab.index 0 : { *(.stab.index) }
74 .debug 0 : { *(.debug) } 68 .stab.indexstr 0 : { *(.stab.indexstr) }
75 .line 0 : { *(.line) } 69 .comment 0 : { *(.comment) }
76 70
77 .debug_srcinfo 0 : { *(.debug_srcinfo) } 71 /*
78 .debug_sfnames 0 : { *(.debug_sfnames) } 72 * DWARF debug sections.
79 73 * Symbols in the DWARF debugging sections are relative to the beginning
80 .debug_aranges 0 : { *(.debug_aranges) } 74 * of the section so we begin them at 0.
81 .debug_pubnames 0 : { *(.debug_pubnames) } 75 */
82 76 /* DWARF 1 */
83 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 77 .debug 0 : { *(.debug) }
84 .debug_abbrev 0 : { *(.debug_abbrev) } 78 .line 0 : { *(.line) }
85 .debug_line 0 : { *(.debug_line) } 79 /* GNU DWARF 1 extensions */
86 .debug_frame 0 : { *(.debug_frame) } 80 .debug_srcinfo 0 : { *(.debug_srcinfo) }
87 .debug_str 0 : { *(.debug_str) } 81 .debug_sfnames 0 : { *(.debug_sfnames) }
88 .debug_loc 0 : { *(.debug_loc) } 82 /* DWARF 1.1 and DWARF 2 */
89 .debug_macinfo 0 : { *(.debug_macinfo) } 83 .debug_aranges 0 : { *(.debug_aranges) }
90 84 .debug_pubnames 0 : { *(.debug_pubnames) }
91 .debug_weaknames 0 : { *(.debug_weaknames) } 85 /* DWARF 2 */
92 .debug_funcnames 0 : { *(.debug_funcnames) } 86 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
93 .debug_typenames 0 : { *(.debug_typenames) } 87 .debug_abbrev 0 : { *(.debug_abbrev) }
94 .debug_varnames 0 : { *(.debug_varnames) } 88 .debug_line 0 : { *(.debug_line) }
95 89 .debug_frame 0 : { *(.debug_frame) }
96 /DISCARD/ : { *(.note.GNU-stack) } 90 .debug_str 0 : { *(.debug_str) }
97 /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) } 91 .debug_loc 0 : { *(.debug_loc) }
98 /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } 92 .debug_macinfo 0 : { *(.debug_macinfo) }
93 /* SGI/MIPS DWARF 2 extensions */
94 .debug_weaknames 0 : { *(.debug_weaknames) }
95 .debug_funcnames 0 : { *(.debug_funcnames) }
96 .debug_typenames 0 : { *(.debug_typenames) }
97 .debug_varnames 0 : { *(.debug_varnames) }
98
99 /DISCARD/ : {
100 *(.note.GNU-stack)
101 *(.data .data.* .gnu.linkonce.d.* .sdata*)
102 *(.bss .sbss .dynbss .dynsbss)
103 }
99} 104}
100 105
106/*
107 * Very old versions of ld do not recognize this name token; use the constant.
108 */
109#define PT_GNU_EH_FRAME 0x6474e550
101 110
111/*
112 * We must supply the ELF program headers explicitly to get just one
113 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
114 */
102PHDRS 115PHDRS
103{ 116{
104 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ 117 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
105 note PT_NOTE FLAGS(4); /* PF_R */ 118 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
106 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ 119 note PT_NOTE FLAGS(4); /* PF_R */
107 eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ 120 eh_frame_hdr PT_GNU_EH_FRAME;
108} 121}
109 122
110
111/* 123/*
112 * This controls what symbols we export from the DSO. 124 * This controls what symbols we export from the DSO.
113 */ 125 */
114VERSION 126VERSION
115{ 127{
116 VDSO_VERSION_STRING { 128 VDSO_VERSION_STRING {
117 global: 129 global:
118 __kernel_datapage_offset; /* Has to be there for the kernel to find */ 130 /*
119 __kernel_get_syscall_map; 131 * Has to be there for the kernel to find
120 __kernel_gettimeofday; 132 */
121 __kernel_clock_gettime; 133 __kernel_datapage_offset;
122 __kernel_clock_getres; 134
123 __kernel_get_tbfreq; 135 __kernel_get_syscall_map;
124 __kernel_sync_dicache; 136 __kernel_gettimeofday;
125 __kernel_sync_dicache_p5; 137 __kernel_clock_gettime;
126 __kernel_sigtramp32; 138 __kernel_clock_getres;
127 __kernel_sigtramp_rt32; 139 __kernel_get_tbfreq;
128 local: *; 140 __kernel_sync_dicache;
129 }; 141 __kernel_sync_dicache_p5;
142 __kernel_sigtramp32;
143 __kernel_sigtramp_rt32;
144
145 local: *;
146 };
130} 147}
diff --git a/arch/powerpc/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S
index 2d70f35d50b5..932b3fdb34b9 100644
--- a/arch/powerpc/kernel/vdso64/vdso64.lds.S
+++ b/arch/powerpc/kernel/vdso64/vdso64.lds.S
@@ -10,100 +10,114 @@ ENTRY(_start)
10 10
11SECTIONS 11SECTIONS
12{ 12{
13 . = VDSO64_LBASE + SIZEOF_HEADERS; 13 . = VDSO64_LBASE + SIZEOF_HEADERS;
14 .hash : { *(.hash) } :text 14
15 .gnu.hash : { *(.gnu.hash) } 15 .hash : { *(.hash) } :text
16 .dynsym : { *(.dynsym) } 16 .gnu.hash : { *(.gnu.hash) }
17 .dynstr : { *(.dynstr) } 17 .dynsym : { *(.dynsym) }
18 .gnu.version : { *(.gnu.version) } 18 .dynstr : { *(.dynstr) }
19 .gnu.version_d : { *(.gnu.version_d) } 19 .gnu.version : { *(.gnu.version) }
20 .gnu.version_r : { *(.gnu.version_r) } 20 .gnu.version_d : { *(.gnu.version_d) }
21 21 .gnu.version_r : { *(.gnu.version_r) }
22 .note : { *(.note.*) } :text :note 22
23 23 .note : { *(.note.*) } :text :note
24 . = ALIGN (16); 24
25 .text : 25 . = ALIGN(16);
26 { 26 .text : {
27 *(.text .stub .text.* .gnu.linkonce.t.*) 27 *(.text .stub .text.* .gnu.linkonce.t.*)
28 *(.sfpr .glink) 28 *(.sfpr .glink)
29 } :text 29 } :text
30 PROVIDE (__etext = .); 30 PROVIDE(__etext = .);
31 PROVIDE (_etext = .); 31 PROVIDE(_etext = .);
32 PROVIDE (etext = .); 32 PROVIDE(etext = .);
33 33
34 . = ALIGN(8); 34 . = ALIGN(8);
35 __ftr_fixup : { 35 __ftr_fixup : { *(__ftr_fixup) }
36 *(__ftr_fixup) 36
37 } 37 . = ALIGN(8);
38 38 __fw_ftr_fixup : { *(__fw_ftr_fixup) }
39 . = ALIGN(8); 39
40 __fw_ftr_fixup : { 40 /*
41 *(__fw_ftr_fixup) 41 * Other stuff is appended to the text segment:
42 } 42 */
43 43 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
44 /* Other stuff is appended to the text segment: */ 44 .rodata1 : { *(.rodata1) }
45 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } 45
46 .rodata1 : { *(.rodata1) } 46 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
47 .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr 47 .eh_frame : { KEEP (*(.eh_frame)) } :text
48 .eh_frame : { KEEP (*(.eh_frame)) } :text 48 .gcc_except_table : { *(.gcc_except_table) }
49 .gcc_except_table : { *(.gcc_except_table) } 49
50 50 .opd ALIGN(8) : { KEEP (*(.opd)) }
51 .opd ALIGN(8) : { KEEP (*(.opd)) } 51 .got ALIGN(8) : { *(.got .toc) }
52 .got ALIGN(8) : { *(.got .toc) } 52 .rela.dyn ALIGN(8) : { *(.rela.dyn) }
53 .rela.dyn ALIGN(8) : { *(.rela.dyn) } 53
54 54 .dynamic : { *(.dynamic) } :text :dynamic
55 .dynamic : { *(.dynamic) } :text :dynamic 55
56 56 _end = .;
57 _end = .; 57 PROVIDE(end = .);
58 PROVIDE (end = .); 58
59 59 /*
60 /* Stabs debugging sections are here too 60 * Stabs debugging sections are here too.
61 */ 61 */
62 .stab 0 : { *(.stab) } 62 .stab 0 : { *(.stab) }
63 .stabstr 0 : { *(.stabstr) } 63 .stabstr 0 : { *(.stabstr) }
64 .stab.excl 0 : { *(.stab.excl) } 64 .stab.excl 0 : { *(.stab.excl) }
65 .stab.exclstr 0 : { *(.stab.exclstr) } 65 .stab.exclstr 0 : { *(.stab.exclstr) }
66 .stab.index 0 : { *(.stab.index) } 66 .stab.index 0 : { *(.stab.index) }
67 .stab.indexstr 0 : { *(.stab.indexstr) } 67 .stab.indexstr 0 : { *(.stab.indexstr) }
68 .comment 0 : { *(.comment) } 68 .comment 0 : { *(.comment) }
69 /* DWARF debug sectio/ns. 69
70 Symbols in the DWARF debugging sections are relative to the beginning 70 /*
71 of the section so we begin them at 0. */ 71 * DWARF debug sections.
72 /* DWARF 1 */ 72 * Symbols in the DWARF debugging sections are relative to the beginning
73 .debug 0 : { *(.debug) } 73 * of the section so we begin them at 0.
74 .line 0 : { *(.line) } 74 */
75 /* GNU DWARF 1 extensions */ 75 /* DWARF 1 */
76 .debug_srcinfo 0 : { *(.debug_srcinfo) } 76 .debug 0 : { *(.debug) }
77 .debug_sfnames 0 : { *(.debug_sfnames) } 77 .line 0 : { *(.line) }
78 /* DWARF 1.1 and DWARF 2 */ 78 /* GNU DWARF 1 extensions */
79 .debug_aranges 0 : { *(.debug_aranges) } 79 .debug_srcinfo 0 : { *(.debug_srcinfo) }
80 .debug_pubnames 0 : { *(.debug_pubnames) } 80 .debug_sfnames 0 : { *(.debug_sfnames) }
81 /* DWARF 2 */ 81 /* DWARF 1.1 and DWARF 2 */
82 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } 82 .debug_aranges 0 : { *(.debug_aranges) }
83 .debug_abbrev 0 : { *(.debug_abbrev) } 83 .debug_pubnames 0 : { *(.debug_pubnames) }
84 .debug_line 0 : { *(.debug_line) } 84 /* DWARF 2 */
85 .debug_frame 0 : { *(.debug_frame) } 85 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
86 .debug_str 0 : { *(.debug_str) } 86 .debug_abbrev 0 : { *(.debug_abbrev) }
87 .debug_loc 0 : { *(.debug_loc) } 87 .debug_line 0 : { *(.debug_line) }
88 .debug_macinfo 0 : { *(.debug_macinfo) } 88 .debug_frame 0 : { *(.debug_frame) }
89 /* SGI/MIPS DWARF 2 extensions */ 89 .debug_str 0 : { *(.debug_str) }
90 .debug_weaknames 0 : { *(.debug_weaknames) } 90 .debug_loc 0 : { *(.debug_loc) }
91 .debug_funcnames 0 : { *(.debug_funcnames) } 91 .debug_macinfo 0 : { *(.debug_macinfo) }
92 .debug_typenames 0 : { *(.debug_typenames) } 92 /* SGI/MIPS DWARF 2 extensions */
93 .debug_varnames 0 : { *(.debug_varnames) } 93 .debug_weaknames 0 : { *(.debug_weaknames) }
94 94 .debug_funcnames 0 : { *(.debug_funcnames) }
95 /DISCARD/ : { *(.note.GNU-stack) } 95 .debug_typenames 0 : { *(.debug_typenames) }
96 /DISCARD/ : { *(.branch_lt) } 96 .debug_varnames 0 : { *(.debug_varnames) }
97 /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) } 97
98 /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) } 98 /DISCARD/ : {
99 *(.note.GNU-stack)
100 *(.branch_lt)
101 *(.data .data.* .gnu.linkonce.d.* .sdata*)
102 *(.bss .sbss .dynbss .dynsbss)
103 }
99} 104}
100 105
106/*
107 * Very old versions of ld do not recognize this name token; use the constant.
108 */
109#define PT_GNU_EH_FRAME 0x6474e550
110
111/*
112 * We must supply the ELF program headers explicitly to get just one
113 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
114 */
101PHDRS 115PHDRS
102{ 116{
103 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */ 117 text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
104 note PT_NOTE FLAGS(4); /* PF_R */ 118 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
105 dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ 119 note PT_NOTE FLAGS(4); /* PF_R */
106 eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */ 120 eh_frame_hdr PT_GNU_EH_FRAME;
107} 121}
108 122
109/* 123/*
@@ -111,17 +125,22 @@ PHDRS
111 */ 125 */
112VERSION 126VERSION
113{ 127{
114 VDSO_VERSION_STRING { 128 VDSO_VERSION_STRING {
115 global: 129 global:
116 __kernel_datapage_offset; /* Has to be there for the kernel to find */ 130 /*
117 __kernel_get_syscall_map; 131 * Has to be there for the kernel to find
118 __kernel_gettimeofday; 132 */
119 __kernel_clock_gettime; 133 __kernel_datapage_offset;
120 __kernel_clock_getres; 134
121 __kernel_get_tbfreq; 135 __kernel_get_syscall_map;
122 __kernel_sync_dicache; 136 __kernel_gettimeofday;
123 __kernel_sync_dicache_p5; 137 __kernel_clock_gettime;
124 __kernel_sigtramp_rt64; 138 __kernel_clock_getres;
125 local: *; 139 __kernel_get_tbfreq;
126 }; 140 __kernel_sync_dicache;
141 __kernel_sync_dicache_p5;
142 __kernel_sigtramp_rt64;
143
144 local: *;
145 };
127} 146}