Bug 12079

Summary: Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel
Product: Other Reporter: Jorge Peixoto de Morais Neto (please.no.spam.here+linux+bugzilla)
Component: OtherAssignee: Alexey Dobriyan (adobriyan)
Status: RESOLVED WILL_FIX_LATER    
Severity: normal CC: adobriyan, ck+kernelbugzilla, ilyapoz, mmokrejs, please.no.spam.here+linux+bugzilla, vitoriung
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27.7 Subsystem:
Regression: No Bisected commit-id:
Attachments: A stripped-to-the-minimal config that triggers this bug
config of the kernel running on the system
linux-2.6.31-rc6-git6/.config

Description Jorge Peixoto de Morais Neto 2008-11-22 08:37:55 UTC
Latest working kernel version:?
Earliest failing kernel version:2.6.27
Distribution:Gentoo 2008.0/desktop
Hardware Environment: Athlon XP 2600+, 1GiB DDR RAM
Software Environment: gcc-4.1.2, glibc-2.6.1-r0, linux 2.6.27.7, linux-headers- 2.6.27-r2, libtool-1.5.26, bash-3.2_p33, python-2.5.2-r7
Problem Description: this warning, when compiled with make CONFIG_DEBUG_SECTION_MISMATCH=y

[...]
MODPOST vmlinux.o
WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel()
The variable __cpuinitdata initial_code references
a function __init i386_start_kernel().
If i386_start_kernel is only used by initial_code then
annotate i386_start_kernel with a matching annotation.

  GEN     .version
[...]

Steps to reproduce:
1) Enter a vanilla source directory of version 2.6.27, 2.6.27.6 or 2.6.27.7 (these were the versions I tested, but obviously others may be affected)
2) generate configuration. Optionally, use the attached stripped-to-the-minimum .config
3) make CONFIG_DEBUG_SECTION_MISMATCH=y

I will attach a .config that triggers this bug (named minimal-config), and also the config of the running kernel (named as host-config)
Comment 1 Jorge Peixoto de Morais Neto 2008-11-22 08:39:52 UTC
Created attachment 18968 [details]
A stripped-to-the-minimal config that triggers this bug
Comment 2 Jorge Peixoto de Morais Neto 2008-11-22 08:41:38 UTC
Created attachment 18969 [details]
config of the kernel running on the system

host-config
Comment 3 Vito 2009-02-06 13:44:05 UTC
I have this warning on gentoo-sources kernel 2.6.28-r1
Comment 4 Conrad Kostecki 2009-07-03 13:16:22 UTC
This warning happens with 2.6.30-r1 too... (Gentoo-Sources)
Comment 5 Martin Mokrejs 2009-08-22 07:38:39 UTC
Happens too on 2.6.31-rc6-git6

  MODPOST vmlinux.o
WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel()
The variable __cpuinitdata initial_code references
a function __init i386_start_kernel().
If i386_start_kernel is only used by initial_code then
annotate i386_start_kernel with a matching annotation.
Comment 6 Martin Mokrejs 2009-08-22 07:39:34 UTC
Created attachment 22802 [details]
linux-2.6.31-rc6-git6/.config
Comment 7 Alexey Dobriyan 2009-11-16 14:13:32 UTC
Please, do not file compile failures, link failures or section mismatches
into bugzilla. Such errors come and go, fixed pretty quickly and bugzilla
is simply to far away from people who will fix them.

Believe me, developers know about them and they know about i386_start_kernel().
It's likely a false positive.