From 37b73c828185731f6236a6387c02d7b08c150810 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Fri, 6 Jan 2006 00:12:01 -0800 Subject: [PATCH] x86/x86_64: mark rodata section read only: generic infrastructure Generic prep-work for marking the .rodata section readonly: * Align the rodata section at 4Kb boundary * call the mark_rodata_ro() function when available Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Adrian Bunk Cc: Andi Kleen Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-generic/vmlinux.lds.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 094d4917c1a9..35de20cf8fac 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -10,6 +10,8 @@ #define ALIGN_FUNCTION() . = ALIGN(8) #define RODATA \ + . = ALIGN(4096); \ + __start_rodata = .; \ .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ *(.rodata) *(.rodata.*) \ *(__vermagic) /* Kernel version magic */ \ @@ -74,6 +76,8 @@ __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \ *(__ksymtab_strings) \ } \ + __end_rodata = .; \ + . = ALIGN(4096); \ \ /* Built-in module parameters. */ \ __param : AT(ADDR(__param) - LOAD_OFFSET) { \ -- cgit v1.2.2