kbuild fixes for section mismatch warnings

From: Sam Ravnborg
Date: Thu Mar 08 2007 - 14:21:53 EST


The following series of patches gets rid of some false positives
for the section mismatch warnings.
It also enables proper check of section mismatch warnings
when a module is built-in.
So expect a few new warnings to pop up..

The most controversial ones are the patch that ignores
the warning when a function marked __init is exported. Greg KH
says it is OK. And the one allowing the logo references.
Comments are welcome!


kbuild: silence section mismatch warnings for exported functions
kbuild: whitelist logo references from .text to .init.data
kbuild: fix segmentation fault in modpost
kbuild: fix warnings from .pci_fixup section
kbuild: whitelist section mismatch in init/main.c
kbuild: fix section mismatch check for vmlinux

During the last release a great number of section mismatch fixes
has been included and the plan is to make a section mismatch
an error on line with any normal linking errors when all the
non-drivers warnings are fixed.

The diffstat:

b/Makefile | 1
b/init/main.c | 6 +-
b/scripts/Makefile.modpost | 8 +--
b/scripts/mod/modpost.c | 34 +++++++++------
scripts/mod/modpost.c | 98 ++++++++++++++++++++++++++++++++-------------
5 files changed, 100 insertions(+), 47 deletions(-)

The changes to init/main.c is a simple function rename.
The full list of changes are included below.

The changes are present in kbuild.git at:
git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git

I do not plan to push these until next merge window since this
is not critical changes.

PS. I have a backlog of three months of kbuild mails that I
need to walk through. Andrew have applied quite a lot in main
absence period but I have a few remaining patches.
They will be pushed when I get to them.


Sam