Skip to content

Commit 028eceb

Browse files
committed
kbuild, modpost: fix "unexpected non-allocatable" warning with SUSE gcc
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>
1 parent 7d875a0 commit 028eceb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/mod/modpost.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ int match(const char *sym, const char * const pat[])
727727

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

732732
/*
733733
* This is used to find sections missing the SHF_ALLOC flag.

0 commit comments

Comments
 (0)