aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-12-06 20:14:19 -0500
committerAndi Kleen <andi@basil.nowhere.org>2006-12-06 20:14:19 -0500
commitb65780e123ba9b762276482bbfb52836e4d41fd9 (patch)
tree735ac2dde1838e6977f0ad2ed2c7e2c65f6271ed
parentc65f38d911aa301cea109d38d40925750dd6c2da (diff)
[PATCH] unwinder: move .eh_frame to RODATA
The .eh_frame section contents is never written to, so it can as well benefit from CONFIG_DEBUG_RODATA. Diff-ed against firstfloor tree. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r--arch/i386/kernel/vmlinux.lds.S9
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S9
-rw-r--r--include/asm-generic/vmlinux.lds.h17
-rw-r--r--kernel/unwind.c2
4 files changed, 13 insertions, 24 deletions
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S
index 25581e87c60d..56e6ad5cb045 100644
--- a/arch/i386/kernel/vmlinux.lds.S
+++ b/arch/i386/kernel/vmlinux.lds.S
@@ -102,15 +102,6 @@ SECTIONS
102 _edata = .; /* End of data section */ 102 _edata = .; /* End of data section */
103 } 103 }
104 104
105#ifdef CONFIG_STACK_UNWIND
106 . = ALIGN(4);
107 .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) {
108 __start_unwind = .;
109 *(.eh_frame)
110 __end_unwind = .;
111 }
112#endif
113
114 . = ALIGN(THREAD_SIZE); /* init_task */ 105 . = ALIGN(THREAD_SIZE); /* init_task */
115 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { 106 .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
116 *(.data.init_task) 107 *(.data.init_task)
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index d9534e750d4f..6a1f8f491e5d 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -51,15 +51,6 @@ SECTIONS
51 51
52 RODATA 52 RODATA
53 53
54#ifdef CONFIG_STACK_UNWIND
55 . = ALIGN(8);
56 .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) {
57 __start_unwind = .;
58 *(.eh_frame)
59 __end_unwind = .;
60 }
61#endif
62
63 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ 54 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */
64 /* Data */ 55 /* Data */
65 .data : AT(ADDR(.data) - LOAD_OFFSET) { 56 .data : AT(ADDR(.data) - LOAD_OFFSET) {
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 9f4747780dac..4d4c62d11059 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -119,8 +119,7 @@
119 *(__ksymtab_strings) \ 119 *(__ksymtab_strings) \
120 } \ 120 } \
121 \ 121 \
122 /* Unwind data binary search table */ \ 122 EH_FRAME \
123 EH_FRAME_HDR \
124 \ 123 \
125 /* Built-in module parameters. */ \ 124 /* Built-in module parameters. */ \
126 __param : AT(ADDR(__param) - LOAD_OFFSET) { \ 125 __param : AT(ADDR(__param) - LOAD_OFFSET) { \
@@ -162,15 +161,23 @@
162 VMLINUX_SYMBOL(__kprobes_text_end) = .; 161 VMLINUX_SYMBOL(__kprobes_text_end) = .;
163 162
164#ifdef CONFIG_STACK_UNWIND 163#ifdef CONFIG_STACK_UNWIND
165 /* Unwind data binary search table */ 164#define EH_FRAME \
166#define EH_FRAME_HDR \ 165 /* Unwind data binary search table */ \
166 . = ALIGN(8); \
167 .eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \ 167 .eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \
168 VMLINUX_SYMBOL(__start_unwind_hdr) = .; \ 168 VMLINUX_SYMBOL(__start_unwind_hdr) = .; \
169 *(.eh_frame_hdr) \ 169 *(.eh_frame_hdr) \
170 VMLINUX_SYMBOL(__end_unwind_hdr) = .; \ 170 VMLINUX_SYMBOL(__end_unwind_hdr) = .; \
171 } \
172 /* Unwind data */ \
173 . = ALIGN(8); \
174 .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) { \
175 VMLINUX_SYMBOL(__start_unwind) = .; \
176 *(.eh_frame) \
177 VMLINUX_SYMBOL(__end_unwind) = .; \
171 } 178 }
172#else 179#else
173#define EH_FRAME_HDR 180#define EH_FRAME
174#endif 181#endif
175 182
176 /* DWARF debug sections. 183 /* DWARF debug sections.
diff --git a/kernel/unwind.c b/kernel/unwind.c
index 08645aa7c2d6..09c261329249 100644
--- a/kernel/unwind.c
+++ b/kernel/unwind.c
@@ -19,7 +19,7 @@
19#include <asm/uaccess.h> 19#include <asm/uaccess.h>
20#include <asm/unaligned.h> 20#include <asm/unaligned.h>
21 21
22extern char __start_unwind[], __end_unwind[]; 22extern const char __start_unwind[], __end_unwind[];
23extern const u8 __start_unwind_hdr[], __end_unwind_hdr[]; 23extern const u8 __start_unwind_hdr[], __end_unwind_hdr[];
24 24
25#define MAX_STACK_DEPTH 8 25#define MAX_STACK_DEPTH 8