Skip to content

Commit

Permalink
module: mark TRIM_UNUSED_KSYMS as BROKEN on powerpc
Browse files Browse the repository at this point in the history
Commit 3679482, which removed CONFIG_UNUSED_SYMBOLS, unraveled the
TRIM_UNUSED_KSYMS config option to be generally available without depending
on CONFIG_UNUSED_SYMBOLS=y. With CONFIG_UNUSED_SYMBOLS gone, this means
allyesconfig will now select this option without being "behind"
CONFIG_UNUSED_SYMBOLS. Unfortunately, this revealed some underlying build
issues on powerpc. When CONFIG_TRIM_UNUSED_KSYMS is enabled on powerpc, the
build would fail like this:

In file included from include/linux/export.h:123,
                 from include/linux/linkage.h:7,
                 from arch/powerpc/include/asm/unistd.h:18,
                 from <stdin>:2:
./include/generated/autoksyms.h:5:9: warning: missing whitespace after the
macro name
    5 | #define __KSYM_.HT_update_self_and_peer_setting 1
      |         ^~~~~~~
./include/generated/autoksyms.h:6:9: warning: missing whitespace after the
macro name
    6 | #define __KSYM_.RemovePeerTS 1
      |         ^~~~~~~
./include/generated/autoksyms.h:6: warning: "__KSYM_" redefined
    6 | #define __KSYM_.RemovePeerTS 1
      |
./include/generated/autoksyms.h:5: note: this is the location of the
previous definition

This is due to the addition of a dot "." prefix to some symbols that is
specific to powerpc, which confuses the gen_autoksyms script.

This is a temporary workaround for linux-next until gen_autoksyms and
modpost gets fixed.

Link: http://lore.kernel.org/r/20210209210843.3af66662@canb.auug.org.au
Signed-off-by: Jessica Yu <jeyu@kernel.org>
  • Loading branch information
flaming-toast committed Feb 10, 2021
1 parent 1e80d9c commit 1fa67f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions init/Kconfig
Expand Up @@ -2264,6 +2264,7 @@ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

config TRIM_UNUSED_KSYMS
bool "Trim unused exported kernel symbols"
depends on !PPC64 || BROKEN
help
The kernel and some modules make many symbols available for
other modules to use via EXPORT_SYMBOL() and variants. Depending
Expand Down

0 comments on commit 1fa67f8

Please sign in to comment.