]> git.baikalelectronics.ru Git - kernel.git/commit
modpost: Fix modpost license checking of vmlinux.o
authorFrank Rowand <frank.rowand@am.sony.com>
Tue, 10 Apr 2012 00:59:03 +0000 (17:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Apr 2012 03:52:56 +0000 (20:52 -0700)
commitb1ce14d37618136f575666eb99387e608cc2c18e
treec9e622338553c843b8a3b58af00e46be60388502
parentd113812245b3358b9f72c534b419f0d155d6f0f0
modpost: Fix modpost license checking of vmlinux.o

Commit 885ab44a661a ("module: Sort exported symbols") sorts symbols
placing each of them in its own elf section.  This sorting and merging
into the canonical sections are done by the linker.

Unfortunately modpost to generate Module.symvers file parses vmlinux.o
(which is not linked yet) and all modules object files (which aren't
linked yet).  These aren't sanitized by the linker yet.  That breaks
modpost that can't detect license properly for modules.

This patch makes modpost aware of the new exported symbols structure.

[ This above is a slightly corrected version of the explanation of the
  problem, copied from commit 7c0cc73241d1 ("modpost: Fix modpost's
  license checking V3").  That commit fixed the problem for module
  object files, but not for vmlinux.o.  This patch fixes modpost for
  vmlinux.o. ]

Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/mod/modpost.c
scripts/mod/modpost.h