]> err.no Git - linux-2.6/commitdiff
[PATCH] unwinder: move .eh_frame to RODATA
authorJan Beulich <jbeulich@novell.com>
Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 7 Dec 2006 01:14:19 +0000 (02:14 +0100)
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>
arch/i386/kernel/vmlinux.lds.S
arch/x86_64/kernel/vmlinux.lds.S
include/asm-generic/vmlinux.lds.h
kernel/unwind.c

index 25581e87c60d19dd89bddc0faeefb52918c341c5..56e6ad5cb04556380ddbe2a0e386c4c34db03761 100644 (file)
@@ -102,15 +102,6 @@ SECTIONS
        _edata = .;             /* End of data section */
   }
 
-#ifdef CONFIG_STACK_UNWIND
-  . = ALIGN(4);
-  .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) {
-       __start_unwind = .;
-       *(.eh_frame)
-       __end_unwind = .;
-  }
-#endif
-
   . = ALIGN(THREAD_SIZE);      /* init_task */
   .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
        *(.data.init_task)
index d9534e750d4fa548e7f2a016b94fb022ee7689c0..6a1f8f491e5d97b9341c89a250045e7786a86034 100644 (file)
@@ -51,15 +51,6 @@ SECTIONS
 
   RODATA
 
-#ifdef CONFIG_STACK_UNWIND
-  . = ALIGN(8);
-  .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) {
-       __start_unwind = .;
-       *(.eh_frame)
-       __end_unwind = .;
-  }
-#endif
-
   . = ALIGN(PAGE_SIZE);        /* Align data segment to page size boundary */
                                /* Data */
   .data : AT(ADDR(.data) - LOAD_OFFSET) {
index 9f4747780dac71055c1f38af061d7deea03ad94f..4d4c62d11059e84718c8c104c59eba270728fb58 100644 (file)
                *(__ksymtab_strings)                                    \
        }                                                               \
                                                                        \
-       /* Unwind data binary search table */                           \
-       EH_FRAME_HDR                                                    \
+       EH_FRAME                                                        \
                                                                        \
        /* Built-in module parameters. */                               \
        __param : AT(ADDR(__param) - LOAD_OFFSET) {                     \
                VMLINUX_SYMBOL(__kprobes_text_end) = .;
 
 #ifdef CONFIG_STACK_UNWIND
-               /* Unwind data binary search table */
-#define EH_FRAME_HDR                                                   \
+#define EH_FRAME                                                       \
+               /* Unwind data binary search table */                   \
+               . = ALIGN(8);                                           \
                .eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \
                        VMLINUX_SYMBOL(__start_unwind_hdr) = .;         \
                        *(.eh_frame_hdr)                                \
                        VMLINUX_SYMBOL(__end_unwind_hdr) = .;           \
+               }                                                       \
+               /* Unwind data */                                       \
+               . = ALIGN(8);                                           \
+               .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) {         \
+                       VMLINUX_SYMBOL(__start_unwind) = .;             \
+                       *(.eh_frame)                                    \
+                       VMLINUX_SYMBOL(__end_unwind) = .;               \
                }
 #else
-#define EH_FRAME_HDR
+#define EH_FRAME
 #endif
 
                /* DWARF debug sections.
index 08645aa7c2d6c2ae3e9edc741771d8401ac70da8..09c261329249dd5730d7694e214af8240385b48f 100644 (file)
@@ -19,7 +19,7 @@
 #include <asm/uaccess.h>
 #include <asm/unaligned.h>
 
-extern char __start_unwind[], __end_unwind[];
+extern const char __start_unwind[], __end_unwind[];
 extern const u8 __start_unwind_hdr[], __end_unwind_hdr[];
 
 #define MAX_STACK_DEPTH 8