From: Martin Habets Date: Wed, 11 Oct 2006 21:58:30 +0000 (-0700) Subject: [SPARC32]: Fix sparc32 modpost warnings. X-Git-Tag: v2.6.19-rc2~18^2 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=ab5da288ce6a526a0a730362b8c4e03c3a0b58d5;p=powerpc.git [SPARC32]: Fix sparc32 modpost warnings. Fix these 2.6.19-rc1 build warnings from modpost: WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0x3e060) and '__kernel_text_address' WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0x3e064) and '__kernel_text_address' WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0x3e07c) and '__kernel_text_address' WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0x3e080) and '__kernel_text_address' WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'is_ksym_addr' (at offset 0x4b3a4) and 'kallsyms_expand_symbol' WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'is_ksym_addr' (at offset 0x4b3a8) and 'kallsyms_expand_symbol' WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'is_ksym_addr' (at offset 0x4b3b4) and 'kallsyms_expand_symbol' WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'is_ksym_addr' (at offset 0x4b3e4) and 'kallsyms_expand_symbol' WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b640) and 'kallsyms_lookup_size_offset' WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b644) and 'kallsyms_lookup_size_offset' WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0x4b654) and 'kallsyms_lookup_size_offset' WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0x4b658) and 'kallsyms_lookup_size_offset' WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b68c) and 'kallsyms_lookup_size_offset' The crux of the matter is that modpost only checks the relocatable sections. i386 vmlinux has none, so modpost does no checking on it (it does on the modules). However, sparc vmlinux has plenty of relocatable sections because it is being built with 'ld -r' (to allow for btfixup processing). So for sparc, modpost does do a lot of checking. Sure enough, running modpost on arch/sparc/boot/image yields no output (i.e. all is well). modpost.c check_sec_ref() has: /* We want to process only relocation sections and not .init */ if (sechdrs[i].sh_type == SHT_RELA) { // check here } else if (sechdrs[i].sh_type == SHT_REL) { // check here } Signed-off-by: Martin Habets Signed-off-by: David S. Miller --- diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index 346c19a949..1dd78c8488 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S @@ -36,11 +36,11 @@ SECTIONS . = ALIGN(4096); __init_begin = .; + _sinittext = .; .init.text : { - _sinittext = .; *(.init.text) - _einittext = .; } + _einittext = .; __init_text_end = .; .init.data : { *(.init.data) } . = ALIGN(16);