Skip to content

Commit 393ed5d

Browse files
committed
Merge tag 'kbuild-fixes-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix modpost to detect EXPORT_SYMBOL marked as __init or__exit - Update the supported arch list in the LLVM document - Avoid the second link of vmlinux for CONFIG_TRIM_UNUSED_KSYMS - Avoid false __KSYM___this_module define in include/generated/autoksyms.h * tag 'kbuild-fixes-v5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: Ignore __this_module in gen_autoksyms.sh kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt) Documentation/llvm: Update Supported Arch table modpost: fix section mismatch check for exported init/exit sections
2 parents 97d4d02 + ff13976 commit 393ed5d

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Documentation/kbuild/llvm.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,24 @@ yet. Bug reports are always welcome at the issue tracker below!
129129
* - arm64
130130
- Supported
131131
- ``LLVM=1``
132+
* - hexagon
133+
- Maintained
134+
- ``LLVM=1``
132135
* - mips
133136
- Maintained
134-
- ``CC=clang``
137+
- ``LLVM=1``
135138
* - powerpc
136139
- Maintained
137140
- ``CC=clang``
138141
* - riscv
139142
- Maintained
140-
- ``CC=clang``
143+
- ``LLVM=1``
141144
* - s390
142145
- Maintained
143146
- ``CC=clang``
147+
* - um (User Mode)
148+
- Maintained
149+
- ``LLVM=1``
144150
* - x86
145151
- Supported
146152
- ``LLVM=1``

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ KBUILD_MODULES := 1
11411141

11421142
autoksyms_recursive: descend modules.order
11431143
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
1144-
"$(MAKE) -f $(srctree)/Makefile vmlinux"
1144+
"$(MAKE) -f $(srctree)/Makefile autoksyms_recursive"
11451145
endif
11461146

11471147
autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h)

scripts/gen_autoksyms.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,7 @@ EOT
5656
# point addresses.
5757
sed -e 's/^\.//' |
5858
sort -u |
59+
# Ignore __this_module. It's not an exported symbol, and will be resolved
60+
# when the final .ko's are linked.
61+
grep -v '^__this_module$' |
5962
sed -e 's/\(.*\)/#define __KSYM_\1 1/' >> "$output_file"

scripts/mod/modpost.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ static const struct sectioncheck sectioncheck[] = {
980980
},
981981
/* Do not export init/exit functions or data */
982982
{
983-
.fromsec = { "__ksymtab*", NULL },
983+
.fromsec = { "___ksymtab*", NULL },
984984
.bad_tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL },
985985
.mismatch = EXPORT_TO_INIT_EXIT,
986986
.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },

0 commit comments

Comments
 (0)