Skip to contentSkip to conversation

Include __param section in read-only data range

PATCH In review Marcelo Tosatti 2 participants 2 messages Jul 1, 2006 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Include __param section in read-only data range

Hi,

The param section is an array of "kernel_param" structures, storing only constant data: pointer to name, permission of the variable pointed to by (void *)arg and pointers to set/get methods.

Move end_rodata down to include __param section in the read-only range used by CONFIG_DEBUG_RODATA.

include/asm-generic/vmlinux.lds.h +3 -3
index 9d11550..175b632 100644
@@ -90,15 +90,15 @@ #define RODATA								\
         __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {	\
 		*(__ksymtab_strings)					\
 	}								\
-	__end_rodata = .;						\
-	. = ALIGN(4096);						\
 									\
 	/* Built-in module parameters. */				\
 	__param : AT(ADDR(__param) - LOAD_OFFSET) {			\
 		VMLINUX_SYMBOL(__start___param) = .;			\
 		*(__param)						\
 		VMLINUX_SYMBOL(__stop___param) = .;			\
-	}
+	}								\
+	__end_rodata = .;						\
+	. = ALIGN(4096);						
 
 #define SECURITY_INIT							\
 	.security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Marcelo Tosatti

Hi,

The param section is an array of "kernel_param" structures, storing only constant data: pointer to name, permission of the variable pointed to by (void *)arg and pointers to set/get methods.

Move end_rodata down to include __param section in the read-only range used by CONFIG_DEBUG_RODATA.