diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-29 23:03:17 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-29 23:03:17 +0300 |
commit | 668c35f69cc750aaf07bd5fe7710a47e2aed6e43 (patch) | |
tree | 3a54f093d548b62b143bf1bc47aa657be17924f8 /include/linux | |
parent | d8372ba8ce288acdfce67cb873b2a741785c2e88 (diff) | |
parent | dec28d8ea2f731b7ec68a2c9421e99a165d47b57 (diff) | |
download | linux-668c35f69cc750aaf07bd5fe7710a47e2aed6e43.tar.xz |
Merge tag 'kbuild-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
"Kbuild core:
- remove unneeded $(call cc-option,...) switches
- consolidate Clang compiler flags into CLANG_FLAGS
- announce the deprecation of SUBDIRS
- fix single target build for external module
- simplify the dependencies of 'prepare' stage targets
- allow fixdep to directly write to .*.cmd files
- simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS
- change if_changed_rule to accept multi-line recipe
- move .SECONDARY special target to scripts/Kbuild.include
- remove redundant 'set -e'
- improve parallel execution for CONFIG_HEADERS_CHECK
- misc cleanups
Treewide fixes and cleanups
- set Clang flags correctly for PowerPC boot images
- fix UML build error with CONFIG_GCC_PLUGINS
- remove unneeded patterns from .gitignore files
- refactor firmware/Makefile
- remove unneeded rules for *offsets.s
- avoid unneeded regeneration of intermediate .s files
- clean up ./Kbuild
Modpost:
- remove unused -M, -K options
- fix false positive warnings about section mismatch
- use simple devtable lookup instead of linker magic
- misc cleanups
Coccinelle:
- relax boolinit.cocci checks for overall consistency
- fix warning messages of boolinit.cocci
Other tools:
- improve -dirty check of scripts/setlocalversion
- add a tool to generate compile_commands.json from .*.cmd files"
* tag 'kbuild-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (51 commits)
kbuild: remove unused cmd_gentimeconst
kbuild: remove $(obj)/ prefixes in ./Kbuild
treewide: add intermediate .s files to targets
treewide: remove explicit rules for *offsets.s
firmware: refactor firmware/Makefile
firmware: remove unnecessary patterns from .gitignore
scripts: remove unnecessary ihex2fw and check-lc_ctypes from .gitignore
um: remove unused filechk_gen_header in Makefile
scripts: add a tool to produce a compile_commands.json file
kbuild: add -Werror=implicit-int flag unconditionally
kbuild: add -Werror=strict-prototypes flag unconditionally
kbuild: add -fno-PIE flag unconditionally
scripts: coccinelle: Correct warning message
scripts: coccinelle: only suggest true/false in files that already use them
kbuild: handle part-of-module correctly for *.ll and *.symtypes
kbuild: refactor part-of-module
kbuild: refactor quiet_modtag
kbuild: remove redundant quiet_modtag for $(obj-m)
kbuild: refactor Makefile.asm-generic
user/Makefile: Fix typo and capitalization in comment section
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/export.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/export.h b/include/linux/export.h index ce764a5d2ee4..fd8711ed9ac4 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -92,22 +92,22 @@ struct kernel_symbol { */ #define __EXPORT_SYMBOL(sym, sec) -#elif defined(__KSYM_DEPS__) +#elif defined(CONFIG_TRIM_UNUSED_KSYMS) + +#include <generated/autoksyms.h> /* * For fine grained build dependencies, we want to tell the build system * about each possible exported symbol even if they're not actually exported. - * We use a string pattern that is unlikely to be valid code that the build - * system filters out from the preprocessor output (see ksym_dep_filter - * in scripts/Kbuild.include). + * We use a symbol pattern __ksym_marker_<symbol> that the build system filters + * from the $(NM) output (see scripts/gen_ksymdeps.sh). These symbols are + * discarded in the final link stage. */ -#define __EXPORT_SYMBOL(sym, sec) === __KSYM_##sym === - -#elif defined(CONFIG_TRIM_UNUSED_KSYMS) - -#include <generated/autoksyms.h> +#define __ksym_marker(sym) \ + static int __ksym_marker_##sym[0] __section(".discard.ksym") __used #define __EXPORT_SYMBOL(sym, sec) \ + __ksym_marker(sym); \ __cond_export_sym(sym, sec, __is_defined(__KSYM_##sym)) #define __cond_export_sym(sym, sec, conf) \ ___cond_export_sym(sym, sec, conf) |