Skip to content

Commit

Permalink
kbuild, modpost: fix "unexpected non-allocatable" warning with SUSE gcc
Browse files Browse the repository at this point in the history
Jean reported that he saw one warning for each module like the one below:
WARNING: arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.o (.comment.SUSE.OPTs): unexpected non-allocatable section.

The warning appeared with the improved version of the
check of the flags in the sections.

That check already ignored sections named ".comment" - but SUSE store
additional info in the comment section and has named it in a SUSE
specific way. Therefore modpost failed to ignore the section.

The fix is to extend the pattern so we ignore all sections
that start with the name ".comment.".

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Sam Ravnborg committed May 4, 2009
1 parent 7d875a0 commit 028eceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ int match(const char *sym, const char * const pat[])

/* sections that we do not want to do full section mismatch check on */
static const char *section_white_list[] =
{ ".comment", ".debug*", ".stab*", ".note*", ".got*", ".toc*", NULL };
{ ".comment*", ".debug*", ".stab*", ".note*", ".got*", ".toc*", NULL };

/*
* This is used to find sections missing the SHF_ALLOC flag.
Expand Down

0 comments on commit 028eceb

Please sign in to comment.