Re: modpost warning question
From: Sam Ravnborg <hidden>
Date: 2007-07-25 11:44:39
Also in:
lkml, netdev
On Wed, Jul 25, 2007 at 06:08:03PM +0800, chengong wrote:
On Wed, 2007-07-25 at 09:27 +0200, Sam Ravnborg wrote:quoted
On Wed, Jul 25, 2007 at 02:14:12AM -0500, Kumar Gala wrote:quoted
I'm seeing the following warning: WARNING: vmlinux.o(.init.text+0x1acdc): Section mismatch: reference to .exit.text:gfar_mdio_exit (between 'gfar_init' and 'gfar_mdio_init') I don't understand why its not ok to access .exit.text from .init.textSeveral architectures discards .exit.text in the final linker script (arch/$(ARCH)/kernel/vmlinux.lds.S So any references to .exit.text will when a module is build-in result in a linker error because ld will flag it as an error when we reference a symbol in a discarded section.But why? Just make kernel size smaller?
Yes - that the whole goal of init/exit sections.
quoted
For the popular architectures (i386,x86_64) we discard .exit.text at runtime so here we do not see the error from ld (sadly). From which version? On my machine I have seen the same problem whenbuilding i386 target with the version 2.6.21.
modpost has started to warn about it. I assume you did not see link errors. Sam