From a581c2a4697ee264699b364399b73477af408e00 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Sat, 1 Jul 2006 04:36:30 -0700 Subject: [PATCH] add __[start|end]_rodata sections to asm-generic/sections.h Add __start_rodata and __end_rodata to sections.h to avoid extern declarations. Needed by s390 code (see following patch). [akpm@osdl.org: update architectures] Cc: Arjan van de Ven Cc: Martin Schwidefsky Signed-off-by: Heiko Carstens Cc: Andi Kleen Acked-by: Kyle McMartin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/x86_64/mm/init.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'arch/x86_64/mm') diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 72f140f81b70..d14fb2dfbfc4 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -678,16 +678,15 @@ void free_initmem(void) #ifdef CONFIG_DEBUG_RODATA -extern char __start_rodata, __end_rodata; void mark_rodata_ro(void) { - unsigned long addr = (unsigned long)&__start_rodata; + unsigned long addr = (unsigned long)__start_rodata; - for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) + for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE) change_page_attr_addr(addr, 1, PAGE_KERNEL_RO); printk ("Write protecting the kernel read-only data: %luk\n", - (&__end_rodata - &__start_rodata) >> 10); + (__end_rodata - __start_rodata) >> 10); /* * change_page_attr_addr() requires a global_flush_tlb() call after it. -- cgit v1.2.3