Commit b65780e1 authored by Jan Beulich's avatar Jan Beulich Committed by Andi Kleen

[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: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent c65f38d9
...@@ -102,15 +102,6 @@ SECTIONS ...@@ -102,15 +102,6 @@ SECTIONS
_edata = .; /* End of data section */ _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 */ . = ALIGN(THREAD_SIZE); /* init_task */
.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
*(.data.init_task) *(.data.init_task)
......
...@@ -51,15 +51,6 @@ SECTIONS ...@@ -51,15 +51,6 @@ SECTIONS
RODATA 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 */ . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */
/* Data */ /* Data */
.data : AT(ADDR(.data) - LOAD_OFFSET) { .data : AT(ADDR(.data) - LOAD_OFFSET) {
......
...@@ -119,8 +119,7 @@ ...@@ -119,8 +119,7 @@
*(__ksymtab_strings) \ *(__ksymtab_strings) \
} \ } \
\ \
/* Unwind data binary search table */ \ EH_FRAME \
EH_FRAME_HDR \
\ \
/* Built-in module parameters. */ \ /* Built-in module parameters. */ \
__param : AT(ADDR(__param) - LOAD_OFFSET) { \ __param : AT(ADDR(__param) - LOAD_OFFSET) { \
...@@ -162,15 +161,23 @@ ...@@ -162,15 +161,23 @@
VMLINUX_SYMBOL(__kprobes_text_end) = .; VMLINUX_SYMBOL(__kprobes_text_end) = .;
#ifdef CONFIG_STACK_UNWIND #ifdef CONFIG_STACK_UNWIND
/* Unwind data binary search table */ #define EH_FRAME \
#define EH_FRAME_HDR \ /* Unwind data binary search table */ \
. = ALIGN(8); \
.eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \ .eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \
VMLINUX_SYMBOL(__start_unwind_hdr) = .; \ VMLINUX_SYMBOL(__start_unwind_hdr) = .; \
*(.eh_frame_hdr) \ *(.eh_frame_hdr) \
VMLINUX_SYMBOL(__end_unwind_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 #else
#define EH_FRAME_HDR #define EH_FRAME
#endif #endif
/* DWARF debug sections. /* DWARF debug sections.
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/unaligned.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[]; extern const u8 __start_unwind_hdr[], __end_unwind_hdr[];
#define MAX_STACK_DEPTH 8 #define MAX_STACK_DEPTH 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment