diff mbox

allow exception table to be put in .rodata

Message ID 4CFD1B34020000780002625B@vpn.id2.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Dec. 6, 2010, 4:19 p.m. UTC
None
diff mbox

Patch

--- linux-2.6.37-rc4/arch/x86/kernel/vmlinux.lds.S
+++ 2.6.37-rc4-extable-in-rodata/arch/x86/kernel/vmlinux.lds.S
@@ -20,6 +20,8 @@ 
 #define LOAD_OFFSET __START_KERNEL_map
 #endif
 
+#define EXCEPTION_TABLE_RO EXCEPTION_TABLE(16)
+
 #include <asm-generic/vmlinux.lds.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
@@ -113,8 +115,7 @@  SECTIONS
 	} :text = 0x9090
 
 	NOTES :text :note
-
-	EXCEPTION_TABLE(16) :text = 0x9090
+	text_continues : {} :text /* switch back to regular text... */
 
 	X64_ALIGN_DEBUG_RODATA_BEGIN
 	RO_DATA(PAGE_SIZE)
--- linux-2.6.37-rc4/include/asm-generic/vmlinux.lds.h
+++ 2.6.37-rc4-extable-in-rodata/include/asm-generic/vmlinux.lds.h
@@ -219,6 +219,7 @@ 
 		*(.rodata1)						\
 	}								\
 									\
+	EXCEPTION_TABLE_RO						\
 	BUG_TABLE							\
 									\
 	JUMP_TABLE							\
@@ -439,6 +440,10 @@ 
 		VMLINUX_SYMBOL(__stop___ex_table) = .;			\
 	}
 
+#ifndef EXCEPTION_TABLE_RO
+#define EXCEPTION_TABLE_RO
+#endif
+
 /*
  * Init task
  */