Unify <linux/export.h> and <asm/export.h>, remove EXPORT_DATA_SYMBOL(), faster TRIM_UNUSED_KSYMS
Subsystems (7)
v8 cover Unify <linux/export.h> and <asm/export.h>, remove EXPORT_DATA_SYMBOL(), faster TRIM_UNUSED_KSYMS
This patch set refactors modpost first to make it easier to add new code.
My goals:
- Refactors EXPORT_SYMBOL, <linux/export.h> and <asm/export.h>. You can still put EXPORT_SYMBOL() in *.S file, very close to the definition, but you do not need to care about whether it is a function or a data. This removes EXPORT_DATA_SYMBOL().
- Re-implement TRIM_UNUSED_KSYMS in one-pass.
This makes the building faster.
- Move the static EXPORT_SYMBOL check to modpost. This also makes the building faster.
This patch set is applicable to linux-next 20230608.
V7 fixed build errors reported for Xtensa.
Previous version
v7: https://lore.kernel.org/linux-kbuild/[email protected]/T/#mbaddcee18c9a8cf0a9b1f3fc562d09526cb69540
v6: https://lore.kernel.org/linux-kbuild/CAK7LNARjzGnj+sYX=_5yQ+8qoOQ2KB5N-_Ye53Ru3=XicezTYw@mail.gmail.com/T/#t
v5: https://lore.kernel.org/linux-kbuild/CAK7LNARBiOywrMLbR=9N35sk19U0QM3xcPy7d1WqV-eyb4W23w@mail.gmail.com/T/#t
v4: https://lore.kernel.org/linux-kbuild/CAK7LNASDzy9RERN6+q6WgR4ROYZQue=SBqgbcoYuVePByHtk6Q@mail.gmail.com/T/#t
v3: https://lore.kernel.org/all/[email protected]/
Changes in v8:
- Fix the definition of ____EXPORT_SYMBOL() to v7.
It seems to cause a regression for xtensa. (reported by 0day bot)
Changes in v7:
- New patch
- Fix sparse warning reported by 0day bot
https://lore.kernel.org/linux-kbuild/[email protected]/
- Remove *.usyms
- New patch
Changes in v6:
- Fix build error on UML
- Make the symbol name in the warning more precise
Changes in v5:
- Fix build error on ARM
- Clean up more
Changes in v4:
- Version 3 did not work if a same name symbol exists in a different compilation unit Fix it.
Changes in v3:
- Move struct kernel_symbol to kernel/module/internal.h
Changes in v2:
- Use KSYMTAB_FUNC and KSYMTAB_DATA for functions and data, respectively This distinction is needed for ia64.
Masahiro Yamada (11):
Revert "[PATCH] uml: export symbols added by GCC hardened"
modpost: pass struct module pointer to check_section_mismatch()
kbuild: generate KSYMTAB entries by modpost
ia64,export.h: replace EXPORT_DATA_SYMBOL* with EXPORT_SYMBOL*
modpost: check static EXPORT_SYMBOL* by modpost again
modpost: squash sym_update_namespace() into sym_add_exported()
modpost: use null string instead of NULL pointer for default namespace
kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
modpost: merge two similar section mismatch warnings
modpost: show offset from symbol for section mismatch warnings linux/export.h: rename 'sec' argument to 'license'
.gitignore | 2 - Makefile | 22 +-- arch/ia64/include/asm/Kbuild | 1 + arch/ia64/include/asm/export.h | 3 - arch/ia64/kernel/head.S | 2 +- arch/ia64/kernel/ivt.S | 2 +- arch/um/os-Linux/user_syms.c | 7 - include/asm-generic/export.h | 83 +---------- include/asm-generic/vmlinux.lds.h | 1 + include/linux/export-internal.h | 49 +++++++ include/linux/export.h | 126 ++++------------ include/linux/pm.h | 14 +- kernel/module/internal.h | 12 ++ scripts/Makefile.build | 27 +--- scripts/Makefile.modpost | 7 + scripts/adjust_autoksyms.sh | 73 ---------- scripts/basic/fixdep.c | 3 +- scripts/check-local-export | 70 --------- scripts/gen_autoksyms.sh | 62 -------- scripts/gen_ksymdeps.sh | 30 ---- scripts/mod/modpost.c | 233 +++++++++++++++++++----------- scripts/mod/modpost.h | 1 + scripts/remove-stale-files | 4 + 23 files changed, 268 insertions(+), 566 deletions(-) delete mode 100644 arch/ia64/include/asm/export.h delete mode 100755 scripts/adjust_autoksyms.sh delete mode 100755 scripts/check-local-export delete mode 100755 scripts/gen_autoksyms.sh delete mode 100755 scripts/gen_ksymdeps.sh
Signature · 1 line
2.39.2
PATCH v8 1/11 Revert "[PATCH] uml: export symbols added by GCC hardened"
This reverts commit cead61a6717a9873426b08d73a34a325e3546f5d.
It exported __stack_smash_handler and __guard, while they may not be defined by anyone.
The code *declares* __stack_smash_handler and __guard. It does not create weak symbols. If no external library is linked, they are left undefined, but yet exported.
If a loadable module tries to access non-existing symbols, bad things (a page fault, NULL pointer dereference, etc.) will happen. So, the current code is wrong and dangerous.
If the code were written as follows, it would *define* them as weak symbols so modules would be able to get access to them.
void (*__stack_smash_handler)(void *) __attribute__((weak)); EXPORT_SYMBOL(__stack_smash_handler); long __guard __attribute__((weak)); EXPORT_SYMBOL(__guard);
In fact, modpost forbids exporting undefined symbols. It shows an error message if it detects such a mistake.
ERROR: modpost: "..." [...] was exported without definition
Unfortunately, it is checked only when the code is built as modular. The problem described above has been unnoticed for a long time because arch/um/os-Linux/user_syms.c is always built-in.
With a planned change in Kbuild, exporting undefined symbols will always result in a build error instead of a run-time error. It is a good thing, but we need to fix the breakage in advance.
One fix is to define weak symbols as shown above. An alternative is to export them conditionally as follows:
#ifdef CONFIG_STACKPROTECTOR extern void __stack_smash_handler(void *); EXPORT_SYMBOL(__stack_smash_handler); external long __guard; EXPORT_SYMBOL(__guard); #endif
This is what other architectures do; EXPORT_SYMBOL(__stack_chk_guard) is guarded by #ifdef CONFIG_STACKPROTECTOR.
However, adding the #ifdef guard is not sensible because UML cannot enable the stack-protector in the first place! (Please note UML does not select HAVE_STACKPROTECTOR in Kconfig.)
So, the code is already broken (and unused) in multiple ways.
Just remove.
---
(no changes since v7)
Changes in v7:
- New patch
arch/um/os-Linux/user_syms.c | 7 ------- 1 file changed, 7 deletions(-)
arch/um/os-Linux/user_syms.c +0 -7
@@ -37,13 +37,6 @@ EXPORT_SYMBOL(vsyscall_ehdr);EXPORT_SYMBOL (vsyscall_end);#endif -/* Export symbols used by GCC for the stack protector. */ -extern void __stack_smash_handler (void *) __attribute__((weak)); -EXPORT_SYMBOL (__stack_smash_handler); - -extern long __guard __attribute__((weak)); -EXPORT_SYMBOL (__guard ); -#ifdef _FORTIFY_SOURCEextern int __sprintf_chk (char *str,int flag,size_t len,const char *format);EXPORT_SYMBOL (__sprintf_chk);
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 2/11 modpost: pass struct module pointer to check_section_mismatch()
In reply to Masahiro YamadaThe next commit will use it.
---
scripts/mod/modpost.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
scripts/mod/modpost.c +11 -11
@@ -1211,7 +1211,7 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf, } } -static void check_section_mismatch (const char *modname,struct elf_info *elf, +static void check_section_mismatch (struct module *mod,struct elf_info *elf,Elf_Sym *sym,unsigned int fsecndx,const char *fromsec,Elf_Addr faddr,Elf_Addr taddr)
@@ -1222,7 +1222,7 @@ static void check_section_mismatch(const char *modname, struct elf_info *elf,if (!mismatch)return ; -default_mismatch_handler (modname, elf, mismatch, sym, +default_mismatch_handler (mod->name, elf, mismatch, sym, fsecndx, fromsec, faddr, tosec, taddr); }
@@ -1406,7 +1406,7 @@ static int addend_mips_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)#define R_LARCH_SUB32 55#endif -static void section_rela (const char *modname,struct elf_info *elf, +static void section_rela (struct module *mod,struct elf_info *elf,Elf_Shdr *sechdr) {Elf_Rela *rela;
@@ -1452,12 +1452,12 @@ static void section_rela(const char *modname, struct elf_info *elf,break ; } -check_section_mismatch (modname, elf, elf->symtab_start + r_sym, +check_section_mismatch (mod, elf, elf->symtab_start + r_sym, fsecndx, fromsec, r.r_offset, r.r_addend); } } -static void section_rel (const char *modname,struct elf_info *elf, +static void section_rel (struct module *mod,struct elf_info *elf,Elf_Shdr *sechdr) {Elf_Rel *rel;
@@ -1507,7 +1507,7 @@ static void section_rel(const char *modname, struct elf_info *elf,fatal ("Please add code to calculate addend for this architecture\n" ); } -check_section_mismatch (modname, elf, elf->symtab_start + r_sym, +check_section_mismatch (mod, elf, elf->symtab_start + r_sym, fsecndx, fromsec, r.r_offset, r.r_addend); } }
@@ -1524,19 +1524,19 @@ static void section_rel(const char *modname, struct elf_info *elf,* to find all references to a section that reference a section that will * be discarded and warns about it. **/ -static void check_sec_ref (const char *modname,struct elf_info *elf) +static void check_sec_ref (struct module *mod,struct elf_info *elf) {int i;Elf_Shdr *sechdrs = elf->sechdrs;/* Walk through all sections */ for (i =0 ; i < elf->num_sections; i++) { -check_section (modname, elf, &elf->sechdrs[i]); +check_section (mod->name, elf, &elf->sechdrs[i]);/* We want to process only relocation sections and not .init */ if (sechdrs[i].sh_type ==SHT_RELA ) -section_rela (modname, elf, &elf->sechdrs[i]); +section_rela (mod, elf, &elf->sechdrs[i]);else if (sechdrs[i].sh_type ==SHT_REL ) -section_rel (modname, elf, &elf->sechdrs[i]); +section_rel (mod, elf, &elf->sechdrs[i]); } }
@@ -1707,7 +1707,7 @@ static void read_symbols(const char *modname) sym_get_data(&info, sym)); } -check_sec_ref (modname, &info); +check_sec_ref (mod, &info);if (!mod->is_vmlinux) { version =get_modinfo (&info,"version" );
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 3/11 kbuild: generate KSYMTAB entries by modpost
In reply to Masahiro YamadaCommit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS") made modpost output CRCs in the same way whether the EXPORT_SYMBOL() is placed in *.c or *.S.
For further cleanups, this commit applies a similar approach to the entire data structure of EXPORT_SYMBOL().
The EXPORT_SYMBOL() compilation is split into two stages.
When a source file is compiled, EXPORT_SYMBOL() is converted into a dummy symbol in the .export_symbol section.
For example,
EXPORT_SYMBOL(foo);
EXPORT_SYMBOL_NS_GPL(bar, BAR_NAMESPACE);will be encoded into the following assembly code:
.section ".export_symbol","a"
__export_symbol__foo:
.asciz ""
.balign 8
.quad foo
.previous
.section ".export_symbol","a"
__export_symbol_gpl_bar:
.asciz "BAR_NAMESPACE"
.balign 8
.quad bar
.previousThey are mere markers to tell modpost the name, license, and namespace of the symbols. They will be dropped from the final vmlinux and modules because the *(.export_symbol) will go into /DISCARD/ in the linker script.
Then, modpost extracts all the information about EXPORT_SYMBOL() from the .export_symbol section, and generates the final C code:
KSYMTAB_FUNC(foo, "", "");
KSYMTAB_FUNC(bar, "_gpl", "BAR_NAMESPACE");KSYMTAB_FUNC() (or KSYMTAB_DATA() if it is data) is expanded to struct kernel_symbol that will be linked to the vmlinux or a module.
With this change, EXPORT_SYMBOL() works in the same way for *.c and *.S files, providing the following benefits.
[1] Deprecate EXPORT_DATA_SYMBOL()
In the old days, EXPORT_SYMBOL() was only available in C files. To export a symbol in *.S, EXPORT_SYMBOL() was placed in a separate *.c file. arch/arm/kernel/armksyms.c is one example written in the classic manner.
Commit 22823ab419d8 ("EXPORT_SYMBOL() for asm") removed this limitation. Since then, EXPORT_SYMBOL() can be placed close to the symbol definition in *.S files. It was a nice improvement.
However, as that commit mentioned, you need to use EXPORT_DATA_SYMBOL() for data objects on some architectures.
In the new approach, modpost checks symbol's type (STT_FUNC or not), and outputs KSYMTAB_FUNC() or KSYMTAB_DATA() accordingly.
There are only two users of EXPORT_DATA_SYMBOL:
EXPORT_DATA_SYMBOL_GPL(empty_zero_page) (arch/ia64/kernel/head.S)
EXPORT_DATA_SYMBOL(ia64_ivt) (arch/ia64/kernel/ivt.S)
They are transformed as follows and output into .vmlinux.export.c
KSYMTAB_DATA(empty_zero_page, "_gpl", ""); KSYMTAB_DATA(ia64_ivt, "", "");
The other EXPORT_SYMBOL users in ia64 assembly are output as KSYMTAB_FUNC().
EXPORT_DATA_SYMBOL() is now deprecated.
[2] merge <linux/export.h> and <asm-generic/export.h>
There are two similar header implementations:
include/linux/export.h for .c files
include/asm-generic/export.h for .S files
Ideally, the functionality should be consistent between them, but they tend to diverge.
Commit 8651ec01daed ("module: add support for symbol namespaces.") did not support the namespace for *.S files.
This commit shifts the essential implementation part to C, which supports EXPORT_SYMBOL_NS() for *.S files.
<asm/export.h> and <asm-generic/export.h> will remain as a wrapper of <linux/export.h> for a while.
They will be removed after #include <asm/export.h> directives are all replaced with #include <linux/export.h>.
[3] Implement CONFIG_TRIM_UNUSED_KSYMS in one-pass algorithm (by a later commit)
When CONFIG_TRIM_UNUSED_KSYMS is enabled, Kbuild recursively traverses the directory tree to determine which EXPORT_SYMBOL to trim. If an EXPORT_SYMBOL turns out to be unused by anyone, Kbuild begins the second traverse, where some source files are recompiled with their EXPORT_SYMBOL() tuned into a no-op.
We can do this better now; modpost can selectively emit KSYMTAB entries that are really used by modules.
---
Changes in v8:
- Fix the definition of ____EXPORT_SYMBOL() to v7.
It seems to cause a regression for xtensa. (reported by 0day bot)
Changes in v7:
- Fix sparse warning reported by 0day bot
https://lore.kernel.org/linux-kbuild/[email protected]/
Changes in v6:
- Fix build error on UML
Changes in v5:
- Fix build error on ARM
Changes in v4:
- Version 3 did not work if a same name symbol exists in a different compilation unit Fix it.
Changes in v3:
- Move struct kernel_symbol to kernel/module/internal.h
Changes in v2:
- Use KSYMTAB_FUNC and KSYMTAB_DATA for functions and data, respectively This distinction is needed for ia64.
arch/ia64/include/asm/Kbuild | 1 + arch/ia64/include/asm/export.h | 3 - include/asm-generic/export.h | 84 ++----------------------- include/asm-generic/vmlinux.lds.h | 1 + include/linux/export-internal.h | 49 +++++++++++++++ include/linux/export.h | 99 +++++++++++------------------ include/linux/pm.h | 8 +-- kernel/module/internal.h | 12 ++++ scripts/Makefile.build | 8 +-- scripts/check-local-export | 4 +- scripts/mod/modpost.c | 100 ++++++++++++++++++++---------- scripts/mod/modpost.h | 1 + 12 files changed, 182 insertions(+), 188 deletions(-) delete mode 100644 arch/ia64/include/asm/export.h
arch/ia64/include/asm/Kbuild +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 generated-y += syscall_table.h generic-y += agp.h +generic-y += export.h generic-y += kvm_para.h generic-y += mcs_spinlock.h generic-y += vtime.h
arch/ia64/include/asm/export.h deleted +0 -3
@@ -1,3 +0,0 @@ -/* EXPORT_DATA_SYMBOL != EXPORT_SYMBOL here */ -#define KSYM_FUNC (name) @fptr(name) -#include <asm-generic/export.h>
include/asm-generic/export.h +5 -79
91 lines not on this page · raw message
include/asm-generic/vmlinux.lds.h +1 -0
@@ -1006,6 +1006,7 @@PATCHABLE_DISCARDS \ *(.discard) \ *(.discard.*) \ + *(.export_symbol) \ *(.modinfo) \/* ld.bfd warns about .gnu.version* even when not emitted */ \ *(.gnu.version*) \
include/linux/export-internal.h +49 -0
55 lines not on this page · raw message
include/linux/export.h +37 -62
135 lines not on this page · raw message
include/linux/pm.h +4 -4
@@ -388,10 +388,10 @@ const struct dev_pm_ops name = { \#define EXPORT_PM_FN_NS_GPL (name, ns)#endif -#define EXPORT_DEV_PM_OPS (name) _EXPORT_DEV_PM_OPS(name, "", "") -#define EXPORT_GPL_DEV_PM_OPS (name) _EXPORT_DEV_PM_OPS(name, "_gpl", "") -#define EXPORT_NS_DEV_PM_OPS (name, ns) _EXPORT_DEV_PM_OPS(name, "", #ns) -#define EXPORT_NS_GPL_DEV_PM_OPS (name, ns) _EXPORT_DEV_PM_OPS(name, "_gpl", #ns) +#define EXPORT_DEV_PM_OPS (name) _EXPORT_DEV_PM_OPS(name,, "") +#define EXPORT_GPL_DEV_PM_OPS (name) _EXPORT_DEV_PM_OPS(name,gpl, "") +#define EXPORT_NS_DEV_PM_OPS (name, ns) _EXPORT_DEV_PM_OPS(name,, #ns) +#define EXPORT_NS_GPL_DEV_PM_OPS (name, ns) _EXPORT_DEV_PM_OPS(name,gpl, #ns)/* * Use this if you want to use the same suspend and resume callbacks for suspend
kernel/module/internal.h +12 -0
@@ -32,6 +32,18 @@/* Maximum number of characters written by module_flags() */ #define MODULE_FLAGS_BUF_SIZE (TAINT_FLAGS_COUNT + 4) +struct kernel_symbol { +#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS +int value_offset; +int name_offset; +int namespace_offset; +#else +unsigned long value; +const char *name; +const char *namespace; +#endif +}; +extern struct mutex module_mutex;extern struct list_head modules;
scripts/Makefile.build +3 -5
@@ -163,7 +163,7 @@ quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ ifdef CONFIG_MODVERSIONS # When module versioning is enabled the following steps are executed: # o compile a <file>.o from <file>.c -# o if <file>.o doesn't contain a __ksymtab version, i.e. does +# o if <file>.o doesn't contain a __export_symbol*, i.e. does # not export symbols, it's done. # o otherwise, we calculate symbol versions using the good old # genksyms on the preprocessed source and dump them into the .cmd file.
@@ -171,7 +171,7 @@ ifdef CONFIG_MODVERSIONS # be compiled and linked to the kernel and/or modules. gen_symversions = \ - if $(NM) $@ 2>/dev/null | grep -q __ksymtab; then \ + if $(NM) $@ 2>/dev/null | grep -q '__export_symbol_[^_]*_'; then \ $(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ >> $(dot-target).cmd; \ fi
@@ -342,9 +342,7 @@ $(obj)/%.ll: $(src)/%.rs FORCE cmd_gensymtypes_S = \ { echo "\#include <linux/kernel.h>" ; \ echo "\#include <asm/asm-prototypes.h>" ; \ - $(CPP) $(a_flags) $< | \ - grep "\<___EXPORT_SYMBOL\>" | \ - sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ; } | \ + $(NM) $@ | sed -n 's/.*__export_symbol_[^_]*_\(.*\)/EXPORT_SYMBOL(\1);/p' ; } | \ $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | $(genksyms) quiet_cmd_cc_symtypes_S = SYM $(quiet_modtag) $@
scripts/check-local-export +2 -2
@@ -46,9 +46,9 @@ BEGIN { { symbol_types[$3]=$2 } # append the exported symbol to the array -($3 ~ /^__ksymtab_/) { +($3 ~ /^__export_symbol_(gpl)?_.*/) { export_symbols[i] = $3 - sub(/^__ksymtab_/, "", export_symbols[i]) + sub(/^__export_symbol_(gpl)?_/, "", export_symbols[i]) i++ }
scripts/mod/modpost.c +67 -33
161 lines not on this page · raw message
scripts/mod/modpost.h +1 -0
@@ -137,6 +137,7 @@ struct elf_info {Elf_Shdr *sechdrs;Elf_Sym *symtab_start;Elf_Sym *symtab_stop; +unsigned int export_symbol_secndx;/* .export_symbol section */ char *strtab;char *modinfo;unsigned int modinfo_len;
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 4/11 ia64,export.h: replace EXPORT_DATA_SYMBOL* with EXPORT_SYMBOL*
In reply to Masahiro YamadaWith the previous refactoring, you can always use EXPORT_SYMBOL*.
Replace two instances in ia64, then remove EXPORT_DATA_SYMBOL*.
---
arch/ia64/kernel/head.S | 2 +- arch/ia64/kernel/ivt.S | 2 +- include/asm-generic/export.h | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-)
arch/ia64/kernel/head.S +1 -1
@@ -170,7 +170,7 @@ RestRR: \ __PAGE_ALIGNED_DATA .global empty_zero_page -EXPORT_DATA_SYMBOL_GPL(empty_zero_page) +EXPORT_SYMBOL_GPL(empty_zero_page) empty_zero_page: .skip PAGE_SIZE
arch/ia64/kernel/ivt.S +1 -1
@@ -87,7 +87,7 @@ .align 32768 // align on 32KB boundary .global ia64_ivt - EXPORT_DATA_SYMBOL(ia64_ivt) + EXPORT_SYMBOL(ia64_ivt) ia64_ivt: ///////////////////////////////////////////////////////////////////////////////////////// // 0x0000 Entry 0 (size 64 bundles) VHPT Translation (8,20,47)
include/asm-generic/export.h +0 -3
@@ -8,7 +8,4 @@*/ #include <linux/export.h> -#define EXPORT_DATA_SYMBOL (name) EXPORT_SYMBOL(name) -#define EXPORT_DATA_SYMBOL_GPL (name) EXPORT_SYMBOL_GPL(name) -#endif
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 5/11 modpost: check static EXPORT_SYMBOL* by modpost again
In reply to Masahiro YamadaCommit 31cb50b5590f ("kbuild: check static EXPORT_SYMBOL* by script instead of modpost") moved the static EXPORT_SYMBOL* check from the mostpost to a shell script because I thought it must be checked per compilation unit to avoid false negatives.
I came up with an idea to do this in modpost, against combined ELF files. The relocation entries in ELF will find the correct exported symbol even if there exist symbols with the same name in different compilation units.
Again, the same sample code.
Makefile:
obj-y += foo1.o foo2.o
foo1.c:
#include <linux/export.h>
static void foo(void) {}
EXPORT_SYMBOL(foo); foo2.c:
void foo(void) {}Then, modpost can catch it correctly.
MODPOST Module.symvers
ERROR: modpost: vmlinux: local symbol 'foo' was exported
---
(no changes since v6)
Changes in v6:
- Make the symbol name in the warning more precise
scripts/Makefile.build | 4 --- scripts/check-local-export | 70 -------------------------------------- scripts/mod/modpost.c | 7 ++++ 3 files changed, 7 insertions(+), 74 deletions(-) delete mode 100755 scripts/check-local-export
scripts/Makefile.build +0 -4
@@ -222,8 +222,6 @@ cmd_gen_ksymdeps = \ $(CONFIG_SHELL) $(srctree)/scripts/gen_ksymdeps.sh $@ >> $(dot-target).cmd endif -cmd_check_local_export = $(srctree)/scripts/check-local-export $@ - ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),) cmd_warn_shared_object = $(if $(word 2, $(modname-multi)),$(warning $(kbuild-file): $*.o is added to multiple modules: $(modname-multi))) endif
@@ -231,7 +229,6 @@ endif define rule_cc_o_c $(call cmd_and_fixdep,cc_o_c) $(call cmd,gen_ksymdeps) - $(call cmd,check_local_export) $(call cmd,checksrc) $(call cmd,checkdoc) $(call cmd,gen_objtooldep)
@@ -243,7 +240,6 @@ endef define rule_as_o_S $(call cmd_and_fixdep,as_o_S) $(call cmd,gen_ksymdeps) - $(call cmd,check_local_export) $(call cmd,gen_objtooldep) $(call cmd,gen_symversions_S) $(call cmd,warn_shared_object)
scripts/check-local-export deleted +0 -70
70 lines not on this page · raw message
scripts/mod/modpost.c +7 -0
@@ -1217,6 +1217,13 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,return ; } +if (ELF_ST_BIND (sym->st_info) !=STB_GLOBAL && +ELF_ST_BIND (sym->st_info) !=STB_WEAK ) { +error ("%s: local symbol '%s' was exported\n" , mod->name, + label_name +strlen (prefix)); +return ; + } +if (strcmp (label_name +strlen (prefix), name)) {error ("%s: .export_symbol section references '%s', but it does not seem to be an export symbol\n" , mod->name, name);
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 6/11 modpost: squash sym_update_namespace() into sym_add_exported()
In reply to Masahiro YamadaPass a set of the name, license, and namespace to sym_add_exported().
sym_update_namespace() is unneeded.
---
scripts/mod/modpost.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-)
scripts/mod/modpost.c +4 -23
@@ -355,26 +355,8 @@ static const char *sec_name(const struct elf_info *info, unsigned int secindex)#define strstarts (str, prefix) (strncmp(str, prefix, strlen(prefix)) == 0) -static void sym_update_namespace (const char *symname,const char *namespace) -{ -struct symbol *s =find_symbol (symname); - -/* -* That symbol should have been created earlier and thus this is -* actually an assertion. -*/ -if (!s) { -error ("Could not update namespace(%s) for symbol %s\n" , - namespace, symname); -return ; - } - -free (s->namespace); - s->namespace = namespace[0 ] ?NOFAIL (strdup (namespace)) :NULL ; -} -static struct symbol *sym_add_exported (const char *name,struct module *mod, -bool gpl_only) +bool gpl_only,const char *namespace) {struct symbol *s =find_symbol (name);
@@ -387,6 +369,7 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod, s =alloc_symbol (name); s->module = mod; s->is_gpl_only = gpl_only; + s->namespace = namespace[0 ] ?NOFAIL (strdup (namespace)) :NULL ;list_add_tail (&s->list, &mod->exported_symbols);hash_add_symbol (s);
@@ -1230,8 +1213,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,return ; } - s =sym_add_exported (name, mod, is_gpl); -sym_update_namespace (name,sym_get_data (elf, label)); + s =sym_add_exported (name, mod, is_gpl,sym_get_data (elf, label));/* * We need to be aware whether we are exporting a function or
@@ -2174,9 +2156,8 @@ static void read_dump(const char *fname) mod =new_module (modname,strlen (modname)); mod->from_dump = true; } - s =sym_add_exported (symname, mod, gpl_only); + s =sym_add_exported (symname, mod, gpl_only, namespace);sym_set_crc (s, crc); -sym_update_namespace (symname, namespace); }free (buf);return ;
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 7/11 modpost: use null string instead of NULL pointer for default namespace
In reply to Masahiro YamadaThe default namespace is the null string, "".
When set, the null string "" is converted to NULL:
s->namespace = namespace[0] ? NOFAIL(strdup(namespace)) : NULL;
When printed, the NULL pointer is get back to the null string:
sym->namespace ?: ""
This saves 1 byte memory allocated for "", but loses the readability.
In kernel-space, we strive to save memory, but modpost is a userspace tool used to build the kernel. On modern systems, such small piece of memory is not a big deal.
Handle the namespace string as is.
---
scripts/mod/modpost.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
scripts/mod/modpost.c +11 -6
@@ -300,6 +300,13 @@ static bool contains_namespace(struct list_head *head, const char *namespace) {struct namespace_list *list; +/* +* The default namespace is null string "", which is always implicitly +* contained. +*/ +if (!namespace[0 ]) +return true; +list_for_each_entry (list, head, list) {if (!strcmp (list->namespace, namespace))return true;
@@ -369,7 +376,7 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod, s =alloc_symbol (name); s->module = mod; s->is_gpl_only = gpl_only; - s->namespace = namespace[0 ] ?NOFAIL (strdup (namespace)) :NULL ; + s->namespace =NOFAIL (strdup (namespace));list_add_tail (&s->list, &mod->exported_symbols);hash_add_symbol (s);
@@ -1823,8 +1830,7 @@ static void check_exports(struct module *mod)else basename = mod->name; -if (exp->namespace && - !contains_namespace (&mod->imported_namespaces, exp->namespace)) { +if (!contains_namespace (&mod->imported_namespaces, exp->namespace)) {modpost_log (allow_missing_ns_imports ?LOG_WARN :LOG_ERROR ,"module %s uses symbol %s from namespace %s, but does not import it.\n" , basename, exp->name, exp->namespace);
@@ -1910,8 +1916,7 @@ static void add_exported_symbols(struct buffer *buf, struct module *mod)list_for_each_entry (sym, &mod->exported_symbols, list)buf_printf (buf,"KSYMTAB_%s(%s, \"%s\", \"%s\");\n" , sym->is_func ?"FUNC" :"DATA" , sym->name, - sym->is_gpl_only ?"_gpl" :"" , - sym->namespace ?:"" ); + sym->is_gpl_only ?"_gpl" :"" , sym->namespace);if (!modversions)return ;
@@ -2179,7 +2184,7 @@ static void write_dump(const char *fname)buf_printf (&buf,"0x%08x\t%s\t%s\tEXPORT_SYMBOL%s\t%s\n" , sym->crc, sym->name, mod->name, sym->is_gpl_only ?"_GPL" :"" , - sym->namespace ?:"" ); + sym->namespace); } }write_buf (&buf, fname);
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 8/11 kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
In reply to Masahiro YamadaWhen CONFIG_TRIM_UNUSED_KSYMS is enabled, Kbuild recursively traverses the directory tree to determine which EXPORT_SYMBOL to trim. If an EXPORT_SYMBOL turns out to be unused by anyone, Kbuild begins the second traverse, where some source files are recompiled with their EXPORT_SYMBOL() tuned into a no-op.
Linus stated negative opinions about this slowness in commits:
- 5cf0fd591f2e ("Kbuild: disable TRIM_UNUSED_KSYMS option")
- a555bdd0c58c ("Kbuild: enable TRIM_UNUSED_KSYMS again, with some guarding")
We can do this better now. The final data structures of EXPORT_SYMBOL are generated by the modpost stage, so modpost can selectively emit KSYMTAB entries that are really used by modules.
Commit f73edc8951b2 ("kbuild: unify two modpost invocations") is another ground-work to do this in a one-pass algorithm. With the list of modules, modpost sets sym->used if it is used by a module. modpost emits KSYMTAB only for symbols with sym->used==true.
BTW, Nicolas explained why the trimming was implemented with recursion:
https://lore.kernel.org/all/[email protected]/
Actually, we never achieved that level of optimization where the chain reaction of trimming comes into play because:
- CONFIG_LTO_CLANG cannot remove any unused symbols
- CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled only for vmlinux, but not modules
If deeper trimming is required, we need to revisit this, but I guess that is unlikely to happen.
---
(no changes since v7)
Changes in v7:
- Remove *.usyms
Changes in v5:
- Clean up more
.gitignore | 2 - Makefile | 22 ++--------- include/linux/export.h | 67 +++++----------------------------- scripts/Makefile.build | 15 +------- scripts/Makefile.modpost | 7 ++++ scripts/adjust_autoksyms.sh | 73 ------------------------------------- scripts/basic/fixdep.c | 3 +- scripts/gen_autoksyms.sh | 62 ------------------------------- scripts/gen_ksymdeps.sh | 30 --------------- scripts/mod/modpost.c | 54 ++++++++++++++++++++++++--- scripts/remove-stale-files | 4 ++ 11 files changed, 75 insertions(+), 264 deletions(-) delete mode 100755 scripts/adjust_autoksyms.sh delete mode 100755 scripts/gen_autoksyms.sh delete mode 100755 scripts/gen_ksymdeps.sh
.gitignore +0 -2
@@ -51,7 +51,6 @@ *.symversions *.tab.[ch] *.tar -*.usyms *.xz *.zst Module.symvers
@@ -112,7 +111,6 @@ modules.order # /include/config/ /include/generated/ -/include/ksym/ /arch/*/include/generated/ # stgit generated dirs
Makefile +3 -19
@@ -1193,28 +1193,12 @@ endif export KBUILD_VMLINUX_LIBS export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds -# Recurse until adjust_autoksyms.sh is satisfied -PHONY += autoksyms_recursive ifdef CONFIG_TRIM_UNUSED_KSYMS # For the kernel to actually contain only the needed exported symbols, # we have to build modules as well to determine what those symbols are. -# (this can be evaluated only once include/config/auto.conf has been included) KBUILD_MODULES := 1 - -autoksyms_recursive: $(build-dir) modules.order - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \ - "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive" endif -autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h) - -quiet_cmd_autoksyms_h = GEN $@ - cmd_autoksyms_h = mkdir -p $(dir $@); \ - $(CONFIG_SHELL) $(srctree)/scripts/gen_autoksyms.sh $@ - -$(autoksyms_h): - $(call cmd,autoksyms_h) - # '$(AR) mPi' needs 'T' to workaround the bug of llvm-ar <= 14 quiet_cmd_ar_vmlinux.a = AR $@ cmd_ar_vmlinux.a = \
@@ -1223,7 +1207,7 @@ quiet_cmd_ar_vmlinux.a = AR $@ $(AR) mPiT $$($(AR) t $@ | sed -n 1p) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt) targets += vmlinux.a -vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt autoksyms_recursive FORCE +vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt FORCE $(call if_changed,ar_vmlinux.a) PHONY += vmlinux_o
@@ -1279,7 +1263,7 @@ scripts: scripts_basic scripts_dtc PHONY += prepare archprepare archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \ - asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \ + asm-generic $(version_h) include/generated/utsrelease.h \ include/generated/compile.h include/generated/autoconf.h remove-stale-files prepare0: archprepare
@@ -2039,7 +2023,7 @@ clean: $(clean-dirs) -o -name '*.dtb.S' -o -name '*.dtbo.S' \ -o -name '*.dt.yaml' \ -o -name '*.dwo' -o -name '*.lst' \ - -o -name '*.su' -o -name '*.mod' -o -name '*.usyms' \ + -o -name '*.su' -o -name '*.mod' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ -o -name '*.lex.c' -o -name '*.tab.[ch]' \ -o -name '*.asn1.[ch]' \
include/linux/export.h +10 -57
91 lines not on this page · raw message
scripts/Makefile.build +1 -14
@@ -82,7 +82,7 @@ ifdef need-builtin targets-for-builtin += $(obj)/built-in.a endif -targets-for-modules := $(foreach x, o mod $(if $(CONFIG_TRIM_UNUSED_KSYMS), usyms), \ +targets-for-modules := $(foreach x, o mod, \ $(patsubst %.o, %.$x, $(filter %.o, $(obj-m)))) ifdef need-modorder
@@ -217,18 +217,12 @@ is-standard-object = $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(basetar $(obj)/%.o: objtool-enabled = $(if $(is-standard-object),$(if $(delay-objtool),$(is-single-obj-m),y)) -ifdef CONFIG_TRIM_UNUSED_KSYMS -cmd_gen_ksymdeps = \ - $(CONFIG_SHELL) $(srctree)/scripts/gen_ksymdeps.sh $@ >> $(dot-target).cmd -endif - ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),) cmd_warn_shared_object = $(if $(word 2, $(modname-multi)),$(warning $(kbuild-file): $*.o is added to multiple modules: $(modname-multi))) endif define rule_cc_o_c $(call cmd_and_fixdep,cc_o_c) - $(call cmd,gen_ksymdeps) $(call cmd,checksrc) $(call cmd,checkdoc) $(call cmd,gen_objtooldep)
@@ -239,7 +233,6 @@ endef define rule_as_o_S $(call cmd_and_fixdep,as_o_S) - $(call cmd,gen_ksymdeps) $(call cmd,gen_objtooldep) $(call cmd,gen_symversions_S) $(call cmd,warn_shared_object)
@@ -258,12 +251,6 @@ cmd_mod = printf '%s\n' $(call real-search, $*.o, .o, -objs -y -m) | \ $(obj)/%.mod: FORCE $(call if_changed,mod) -# List module undefined symbols -cmd_undefined_syms = $(NM) $< | sed -n 's/^ *U //p' > $@ - -$(obj)/%.usyms: $(obj)/%.o FORCE - $(call if_changed,undefined_syms) - quiet_cmd_cc_lst_c = MKLST $@ cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && \ $(CONFIG_SHELL) $(srctree)/scripts/makelst $*.o \
scripts/Makefile.modpost +7 -0
@@ -91,6 +91,13 @@ targets += .vmlinux.objs .vmlinux.objs: vmlinux.a $(KBUILD_VMLINUX_LIBS) FORCE $(call if_changed,vmlinux_objs) +ifdef CONFIG_TRIM_UNUSED_KSYMS +ksym-wl := $(CONFIG_UNUSED_KSYMS_WHITELIST) +ksym-wl := $(if $(filter-out /%, $(ksym-wl)),$(srctree)/)$(ksym-wl) +modpost-args += -t $(addprefix -u, $(ksym-wl)) +modpost-deps += $(ksym-wl) +endif + ifeq ($(wildcard vmlinux.o),) missing-input := vmlinux.o output-symdump := modules-only.symvers
scripts/adjust_autoksyms.sh deleted +0 -73
73 lines not on this page · raw message
scripts/basic/fixdep.c +1 -2
@@ -246,8 +246,7 @@ static void *read_file(const char *filename)/* Ignore certain dependencies */ static int is_ignored_file (const char *s,int len) { -return str_ends_with (s, len,"include/generated/autoconf.h" ) || -str_ends_with (s, len,"include/generated/autoksyms.h" ); +return str_ends_with (s, len,"include/generated/autoconf.h" ); }/* Do not parse these files */
scripts/gen_autoksyms.sh deleted +0 -62
62 lines not on this page · raw message
scripts/gen_ksymdeps.sh deleted +0 -30
@@ -1,30 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0 - -set -e - -# List of exported symbols -# -# If the object has no symbol, $NM warns 'no symbols'. -# Suppress the stderr. -# TODO: -# Use -q instead of 2>/dev/null when we upgrade the minimum version of -# binutils to 2.37, llvm to 13.0.0. -ksyms=$($NM $1 2>/dev/null | sed -n 's/.*__ksym_marker_\(.*\)/\1/p') - -if [ -z "$ksyms" ]; then - exit 0 -fi - -echo -echo "ksymdeps_$1 := \\" - -for s in $ksyms -do - printf ' $(wildcard include/ksym/%s) \\\n' "$s" -done - -echo -echo "$1: \$(ksymdeps_$1)" -echo -echo "\$(ksymdeps_$1):"
scripts/mod/modpost.c +49 -5
122 lines not on this page · raw message
scripts/remove-stale-files +4 -0
@@ -33,3 +33,7 @@ rm -f rust/target.json rm -f scripts/bin2c rm -f .scmversion + +rm -rf include/ksym + +find . -name '*.usyms' | xargs rm -f
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
kernel test robot
build botRe: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
kernel test robot noticed the following build errors:
Hi Masahiro,
kernel test robot noticed the following build errors:
[auto build test ERROR on masahiroy-kbuild/for-next]
[also build test ERROR on next-20230609]
[cannot apply to masahiroy-kbuild/fixes arnd-asm-generic/master rafael-pm/linux-next linus/master v6.4-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Masahiro-Yamada/Revert-PATCH-uml-export-symbols-added-by-GCC-hardened/20230610-171620 base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next patch link: https://lore.kernel.org/r/20230610091320.1054554-9-masahiroy%40kernel.org patch subject: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion config: s390-randconfig-r003-20230610 (https://download.01.org/0day-ci/archive/20230611/[email protected]/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git remote add masahiroy-kbuild https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
git fetch masahiroy-kbuild for-next
git checkout masahiroy-kbuild/for-next
b4 shazam https://lore.kernel.org/r/[email protected]
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=s390 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
s390x-linux-ld: drivers/irqchip/irq-al-fic.o: in function `al_fic_init_dt':
irq-al-fic.c:(.init.text+0x24): undefined reference to `of_iomap'
>> s390x-linux-ld: irq-al-fic.c:(.init.text+0x1f0): undefined reference to `iounmap'
--
make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/phy/amd.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-imon-pad.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/input/rmi4/rmi_smbus.ko', needed by '__modfinal'.
>> make[2]: *** No rule to make target 'drivers/iio/health/max30100.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/ir-nec-decoder.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/phy/dp83848.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/power/supply/bq2415x_charger.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-terratec-cinergy-s2-hd.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-nebula.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/phy/davicom.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/common/st_sensors/st_sensors.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'fs/nls/mac-centeuro.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/proximity/vl53l0x-i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/misc/isl29003.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/comedi/comedi.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/accel/mma7660.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/adc/envelope-detector.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/scsi/raid_class.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-ati-tv-wonder-hd-600.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/light/veml6070.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/input/misc/pwm-vibra.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-pine64.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-dreambox.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/nfc/pn544/pn544.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/dac/dpot-dac.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-dib0700-nec.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/light/apds9960.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/phy/national.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/phy/qsemi.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-beelink-gs1.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/virtio/virtio_input.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/leds/leds-tlc591xx.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/temperature/tsys01.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/magnetometer/hmc5843_i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'fs/befs/befs.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/magnetometer/mmc35240.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/staging/most/net/most_net.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-tevii-nec.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/nfc/pn544/pn544_i2c.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/pressure/mpl3115.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-zx-irdec.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/leds/trigger/ledtrig-pattern.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'kernel/kheaders.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/scsi/scsi_transport_fc.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/base/regmap/regmap-i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/misc/lis3lv02d/lis3lv02d.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-astrometa-t2hybrid.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/misc/echo/echo.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/most/most_cdev.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/slimbus/slimbus.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/s390/char/con3270.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/phy/microchip_t1.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/regulator/sy8106a-regulator.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-hauppauge.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/light/adux1020.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/pps/clients/pps-ktimer.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/iio/industrialio-sw-trigger.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-xbox-dvd.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/power/supply/ltc2941-battery-gauge.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'lib/crc64-rocksoft.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-technisat-usb2.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/target/target_core_pscsi.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/net/phy/mscc/mscc.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'fs/nls/nls_euc-jp.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/iio/dac/max517.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'lib/notifier-error-inject.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/buffer/industrialio-buffer-dma.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/mtd/sm_ftl.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/nfc/microread/microread_i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-budget-ci-old.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-pixelview-new.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/proximity/sx_common.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-flydvb.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/common/st_sensors/st_sensors_i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/accel/mma7455_core.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'fs/cachefiles/cachefiles.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/hwtracing/stm/dummy_stm.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/hid/hid-cypress.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/hid/hid-led.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/scsi/scsi_transport_iscsi.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/pressure/st_pressure.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/scsi/device_handler/scsi_dh_emc.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/md4.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/power/supply/bq25890_charger.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/regulator/ltc3589.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/accel/adxl345_core.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-anysee.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'lib/kunit/kunit-test.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'lib/of-reconfig-notifier-error-inject.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/leds/trigger/ledtrig-activity.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/light/isl29028.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/imu/inv_mpu6050/inv-mpu6050-i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/mtd/nftl.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/power/supply/smb347-charger.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-kaiomy.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/mtd/tests/mtd_readtest.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/light/al3320a.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/hid/hid-keytouch.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/leds/leds-is31fl319x.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-wetek-play2.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-avermedia-m135a.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/chemical/ams-iaq-core.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-total-media-in-hand-02.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/wan/hdlc_raw.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/accel/dmard06.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/regulator/vctrl-regulator.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/misc/eeprom/ee1004.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/regulator/mpq7920.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/mtd/tests/mtd_subpagetest.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/leds/leds-pwm.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/iio/proximity/sx9310.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/target/tcm_fc/tcm_fc.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/mtd/ubi/ubi.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'arch/s390/net/pnet.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/iio/magnetometer/bmc150_magn.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/eql.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/vfio/vfio.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/iio/light/si1133.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/mtd/nand/raw/nandsim.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/accel/dmard09.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/dac/ad5592r-base.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-beelink-mxiii.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/staging/most/i2c/most_i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'net/netlink/netlink_diag.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/spmi/spmi.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/devfreq/governor_userspace.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/nvmem/nvmem_qcom-spmi-sdam.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-nec-terratec-cinergy-xs.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'net/unix/unix_diag.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'crypto/pcbc.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'crypto/cast_common.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-pinnacle-grey.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/humidity/hdc100x.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-msi-digivox-ii.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/chemical/scd30_i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/magnetometer/hmc5843_core.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/mdio/fwnode_mdio.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/phy/et1011c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/scsi/scsi_debug.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'net/unix/unix.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/i2c/muxes/i2c-mux-pca954x.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/mdio/mdio-mux.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/mtd/chips/map_absent.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/wan/hdlc_cisco.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/wan/hdlc_ppp.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/scsi/sd_mod.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/hid/hid-monterey.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/lzo-rle.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'lib/kunit/kunit-example-test.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/power/supply/cw2015_battery.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/input/misc/drv2667.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/imu/fxos8700_i2c.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-dntv-live-dvbt-pro.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/media/rc/keymaps/rc-twinhan1027.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/s390/net/smsgiucv.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/pressure/ms5637.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'fs/fuse/virtiofs.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/iio/dac/ad5686.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/iio/adc/qcom-spmi-adc5.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/target/target_core_user.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/leds/leds-lm3530.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/iio/accel/da311.ko', needed by '__modfinal'.
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
Quoted 38 lines · kernel test robot
Hi Masahiro,
kernel test robot noticed the following build errors:
[auto build test ERROR on masahiroy-kbuild/for-next]
[also build test ERROR on next-20230609]
[cannot apply to masahiroy-kbuild/fixes arnd-asm-generic/master rafael-pm/linux-next linus/master v6.4-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]url: https://github.com/intel-lab-lkp/linux/commits/Masahiro-Yamada/Revert-PATCH-uml-export-symbols-added-by-GCC-hardened/20230610-171620 base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next patch link: https://lore.kernel.org/r/20230610091320.1054554-9-masahiroy%40kernel.org patch subject: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion config: s390-randconfig-r003-20230610 (https://download.01.org/0day-ci/archive/20230611/[email protected]/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git remote add masahiroy-kbuild https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
git fetch masahiroy-kbuild for-next
git checkout masahiroy-kbuild/for-next
b4 shazam https://lore.kernel.org/r/[email protected]
# save the config file
mkdirbuild_dir&& cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=s390 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bashIf you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 6 lines
All errors (new ones prefixed by >>):
s390x-linux-ld: drivers/irqchip/irq-al-fic.o: in function `al_fic_init_dt': irq-al-fic.c:(.init.text+0x24): undefined reference to `of_iomap'Quoted 1 line
Quoted 1 line
s390x-linux-ld: irq-al-fic.c:(.init.text+0x1f0): undefined reference to `iounmap'
--
The options in getopt() got broken due to a mistake of git-rebase. I will fix it in v9.
Signature · 2 lines
Best Regards Masahiro Yamada
kernel test robot
build botRe: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
In reply to Masahiro Yamadakernel test robot noticed the following build errors:
Hi Masahiro,
kernel test robot noticed the following build errors:
[auto build test ERROR on masahiroy-kbuild/for-next]
[also build test ERROR on next-20230609]
[cannot apply to masahiroy-kbuild/fixes arnd-asm-generic/master rafael-pm/linux-next linus/master v6.4-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Masahiro-Yamada/Revert-PATCH-uml-export-symbols-added-by-GCC-hardened/20230610-171620 base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next patch link: https://lore.kernel.org/r/20230610091320.1054554-9-masahiroy%40kernel.org patch subject: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion config: riscv-defconfig (https://download.01.org/0day-ci/archive/20230611/[email protected]/config) compiler: riscv64-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add masahiroy-kbuild https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
git fetch masahiroy-kbuild for-next
git checkout masahiroy-kbuild/for-next
b4 shazam https://lore.kernel.org/r/[email protected]
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash M=arch/riscv
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> make[2]: *** No rule to make target 'arch/riscv/kvm/kvm.ko', needed by '__modfinal'.
make[2]: Target '__modfinal' not remade because of errors.
--
make[2]: *** No rule to make target 'crypto/seqiv.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/echainiv.ko', needed by '__modfinal'.
>> make[2]: *** No rule to make target 'crypto/hmac.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'crypto/sha256_generic.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/sha512_generic.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/sha3_generic.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/blake2b_generic.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/cbc.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/ctr.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/gcm.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'crypto/aes_generic.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'crypto/authenc.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/authencesn.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/xxhash_generic.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/drbg.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/jitterentropy_rng.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/ghash-generic.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'crypto/xor.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors.
--
>> make[2]: *** No rule to make target 'drivers/clk/starfive/clk-starfive-jh7100-audio.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/clk/starfive/clk-starfive-jh7110-aon.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/clk/sunxi-ng/sun8i-de2-ccu.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors. -- make[2]: *** No rule to make target 'drivers/dma/virt-dma.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/dma/sun6i-dma.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors. -- >> make[2]: *** No rule to make target 'drivers/i2c/algos/i2c-algo-bit.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/i2c/busses/i2c-mv64xxx.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/i2c/i2c-core.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors. -- >> make[2]: *** No rule to make target 'drivers/input/keyboard/sun4i-lradc-keys.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors. -- make[2]: *** No rule to make target 'drivers/net/mdio/mdio-mux.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/net/pcs/pcs_xpcs.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/net/ethernet/stmicro/stmmac/stmmac.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/net/ethernet/stmicro/stmmac/stmmac-platform.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/net/ethernet/stmicro/stmmac/dwmac-generic.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/net/ipvlan/ipvlan.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/dummy.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/macvlan.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/mii.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/veth.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/net/vxlan/vxlan.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors.
--
>> make[2]: *** No rule to make target 'drivers/phy/allwinner/phy-sun4i-usb.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'drivers/phy/allwinner/phy-sun6i-mipi-dphy.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors. -- >> make[2]: *** No rule to make target 'drivers/video/backlight/backlight.ko', needed by '__modfinal'.
make[2]: *** No rule to make target 'drivers/video/fbdev/core/cfbfillrect.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/video/fbdev/core/cfbcopyarea.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/video/fbdev/core/cfbimgblt.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/video/fbdev/core/sysfillrect.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/video/fbdev/core/syscopyarea.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/video/fbdev/core/sysimgblt.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'drivers/video/fbdev/core/fb_sys_fops.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors.
--
>> make[2]: *** No rule to make target 'lib/crypto/libaes.ko', needed by '__modfinal'. make[2]: *** No rule to make target 'lib/crypto/gf128mul.ko', needed by '__modfinal'. >> make[2]: *** No rule to make target 'lib/crypto/libsha256.ko', needed by '__modfinal'. make[2]: Target '__modfinal' not remade because of errors. -- >> make[2]: *** No rule to make target 'lib/lzo/lzo_compress.ko', needed by '__modfinal'.
make[2]: Target '__modfinal' not remade because of errors.
..
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
In reply to Masahiro Yamadakernel test robot noticed the following build errors:
Hi Masahiro,
kernel test robot noticed the following build errors:
[auto build test ERROR on masahiroy-kbuild/for-next]
[also build test ERROR on next-20230609]
[cannot apply to masahiroy-kbuild/fixes arnd-asm-generic/master rafael-pm/linux-next linus/master v6.4-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Masahiro-Yamada/Revert-PATCH-uml-export-symbols-added-by-GCC-hardened/20230610-171620 base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next patch link: https://lore.kernel.org/r/20230610091320.1054554-9-masahiroy%40kernel.org patch subject: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion config: arc-randconfig-r035-20230610 (https://download.01.org/0day-ci/archive/20230611/[email protected]/config) compiler: arceb-elf-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add masahiroy-kbuild https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
git fetch masahiroy-kbuild for-next
git checkout masahiroy-kbuild/for-next
b4 shazam https://lore.kernel.org/r/[email protected]
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash arch/arc/kernel/ drivers/infiniband/core/ drivers/media/dvb-core/ drivers/mtd/chips/ fs/ io_uring/ kernel/ lib/ mm/ net/802/ net/core/ net/ethernet/ net/ipv4/ net/ipv6/ net/llc/ net/netfilter/ net/rxrpc/ net/sched/ net/wireless/ net/xfrm/ security/keys/
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All error/warnings (new ones prefixed by >>):
{standard input}:2473: Warning: dwarf line number information for .export_symbol ignored {standard input}:2479: Warning: dwarf line number information for .export_symbol ignored {standard input}:2481: Warning: dwarf line number information for .export_symbol ignored {standard input}:2485: Warning: dwarf line number information for .export_symbol ignored {standard input}:2487: Warning: dwarf line number information for .export_symbol ignored {standard input}:2488: Warning: dwarf line number information for .export_symbol ignored {standard input}:2490: Warning: dwarf line number information for .export_symbol ignored {standard input}:2491: Warning: dwarf line number information for .export_symbol ignored {standard input}:2493: Warning: dwarf line number information for .export_symbol ignored {standard input}:2494: Warning: dwarf line number information for .export_symbol ignored {standard input}:2499: Warning: dwarf line number information for .export_symbol ignored {standard input}:2505: Warning: dwarf line number information for .export_symbol ignored {standard input}:2509: Warning: dwarf line number information for .export_symbol ignored {standard input}:2510: Warning: dwarf line number information for .export_symbol ignored {standard input}:2512: Warning: dwarf line number information for .export_symbol ignored {standard input}:2514: Warning: dwarf line number information for .export_symbol ignored {standard input}:2520: Warning: dwarf line number information for .export_symbol ignored {standard input}:2524: Warning: dwarf line number information for .export_symbol ignored {standard input}:2526: Warning: dwarf line number information for .export_symbol ignored {standard input}:2527: Warning: dwarf line number information for .export_symbol ignored {standard input}:2529: Warning: dwarf line number information for .export_symbol ignored {standard input}:2531: Warning: dwarf line number information for .export_symbol ignored {standard input}:2533: Warning: dwarf line number information for .export_symbol ignored {standard input}:2535: Warning: dwarf line number information for .export_symbol ignored {standard input}:2537: Warning: dwarf line number information for .export_symbol ignored {standard input}:2539: Warning: dwarf line number information for .export_symbol ignored {standard input}:2540: Warning: dwarf line number information for .export_symbol ignored {standard input}:2542: Warning: dwarf line number information for .export_symbol ignored {standard input}:2544: Warning: dwarf line number information for .export_symbol ignored {standard input}:2547: Warning: dwarf line number information for .export_symbol ignored {standard input}:2548: Warning: dwarf line number information for .export_symbol ignored {standard input}:2550: Warning: dwarf line number information for .export_symbol ignored {standard input}:2555: Warning: dwarf line number information for .export_symbol ignored {standard input}:2556: Warning: dwarf line number information for .export_symbol ignored {standard input}:2560: Warning: dwarf line number information for .export_symbol ignored {standard input}:2561: Warning: dwarf line number information for .export_symbol ignored {standard input}:2563: Warning: dwarf line number information for .export_symbol ignored {standard input}:2565: Warning: dwarf line number information for .export_symbol ignored {standard input}:2567: Warning: dwarf line number information for .export_symbol ignored {standard input}:2569: Warning: dwarf line number information for .export_symbol ignored {standard input}:2571: Warning: dwarf line number information for .export_symbol ignored {standard input}:2574: Warning: dwarf line number information for .export_symbol ignored {standard input}:2576: Warning: dwarf line number information for .export_symbol ignored {standard input}:2581: Warning: dwarf line number information for .export_symbol ignored {standard input}:2582: Warning: dwarf line number information for .export_symbol ignored {standard input}:2584: Warning: dwarf line number information for .export_symbol ignored {standard input}:2586: Warning: dwarf line number information for .export_symbol ignored {standard input}:2588: Warning: dwarf line number information for .export_symbol ignored {standard input}:2590: Warning: dwarf line number information for .export_symbol ignored {standard input}:2592: Warning: dwarf line number information for .export_symbol ignored {standard input}:2594: Warning: dwarf line number information for .export_symbol ignored {standard input}:2597: Warning: dwarf line number information for .export_symbol ignored {standard input}:2599: Warning: dwarf line number information for .export_symbol ignored {standard input}:2601: Warning: dwarf line number information for .export_symbol ignored {standard input}:2603: Warning: dwarf line number information for .export_symbol ignored {standard input}:2605: Warning: dwarf line number information for .export_symbol ignored {standard input}:2606: Warning: dwarf line number information for .export_symbol ignored {standard input}:2607: Warning: dwarf line number information for .export_symbol ignored {standard input}:2608: Warning: dwarf line number information for .export_symbol ignored {standard input}:2611: Warning: dwarf line number information for .export_symbol ignored {standard input}:2612: Warning: dwarf line number information for .export_symbol ignored {standard input}:2617: Warning: dwarf line number information for .export_symbol ignored {standard input}:2618: Warning: dwarf line number information for .export_symbol ignored {standard input}:2622: Warning: dwarf line number information for .export_symbol ignored {standard input}:2671: Warning: dwarf line number information for .export_symbol ignored {standard input}:2708: Warning: dwarf line number information for .export_symbol ignored {standard input}:2709: Warning: dwarf line number information for .export_symbol ignored {standard input}:2710: Warning: dwarf line number information for .export_symbol ignored {standard input}:2711: Warning: dwarf line number information for .export_symbol ignored {standard input}:2716: Warning: dwarf line number information for .export_symbol ignored {standard input}:2718: Warning: dwarf line number information for .export_symbol ignored {standard input}:2720: Warning: dwarf line number information for .export_symbol ignored {standard input}:2722: Warning: dwarf line number information for .export_symbol ignored {standard input}:2724: Warning: dwarf line number information for .export_symbol ignored {standard input}:2726: Warning: dwarf line number information for .export_symbol ignored {standard input}:2728: Warning: dwarf line number information for .export_symbol ignored {standard input}:2731: Warning: dwarf line number information for .export_symbol ignored {standard input}:2732: Warning: dwarf line number information for .export_symbol ignored {standard input}:2734: Warning: dwarf line number information for .export_symbol ignored {standard input}:2736: Warning: dwarf line number information for .export_symbol ignored {standard input}:2738: Warning: dwarf line number information for .export_symbol ignored {standard input}:2740: Warning: dwarf line number information for .export_symbol ignored {standard input}:2742: Warning: dwarf line number information for .export_symbol ignored {standard input}:2743: Warning: dwarf line number information for .export_symbol ignored {standard input}:2745: Warning: dwarf line number information for .export_symbol ignored {standard input}:2746: Warning: dwarf line number information for .export_symbol ignored {standard input}:2749: Warning: dwarf line number information for .export_symbol ignored {standard input}:2751: Warning: dwarf line number information for .export_symbol ignored {standard input}:2756: Warning: dwarf line number information for .export_symbol ignored {standard input}:2757: Warning: dwarf line number information for .export_symbol ignored {standard input}:2759: Warning: dwarf line number information for .export_symbol ignored {standard input}:2760: Warning: dwarf line number information for .export_symbol ignored {standard input}:2761: Warning: dwarf line number information for .export_symbol ignored {standard input}:2766: Warning: dwarf line number information for .export_symbol ignored {standard input}:2767: Warning: dwarf line number information for .export_symbol ignored {standard input}:2776: Warning: dwarf line number information for .export_symbol ignored {standard input}:2780: Warning: dwarf line number information for .export_symbol ignored {standard input}:2781: Warning: dwarf line number information for .export_symbol ignored {standard input}:2784: Warning: dwarf line number information for .export_symbol ignored {standard input}:2785: Warning: dwarf line number information for .export_symbol ignored
>> arch/arc/include/asm/bitops.h:31: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2799: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2800: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2808: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2812: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2816: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2817: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2819: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2820: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2824: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2829: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2834: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2836: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2843: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2844: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2847: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2852: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2853: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2854: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2856: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2858: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2861: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2865: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2867: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2869: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2874: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2876: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2880: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2882: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2888: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2890: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2895: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2954: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2982: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2983: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2984: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2985: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2986: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2990: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2992: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2993: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2994: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2995: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2997: Warning: dwarf line number information for .export_symbol ignored
{standard input}:2999: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3002: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3004: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3005: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3011: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3013: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3015: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3017: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3019: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3024: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3029: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3034: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3035: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3036: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3038: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3039: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3041: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3042: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3046: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3051: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3056: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3058: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3059: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3062: Warning: dwarf line number information for .export_symbol ignored
{standard input}:3063: Warning: dwarf line number information for .export_symbol ignored
>> arch/arc/include/asm/bitops.h:31: Warning: dwarf line number information for .export_symbol ignored {standard input}:3074: Warning: dwarf line number information for .export_symbol ignored {standard input}:3075: Warning: dwarf line number information for .export_symbol ignored {standard input}:3079: Warning: dwarf line number information for .export_symbol ignored {standard input}:3080: Warning: dwarf line number information for .export_symbol ignored {standard input}:3084: Warning: dwarf line number information for .export_symbol ignored {standard input}:3085: Warning: dwarf line number information for .export_symbol ignored {standard input}:3087: Warning: dwarf line number information for .export_symbol ignored {standard input}:3089: Warning: dwarf line number information for .export_symbol ignored {standard input}:3094: Warning: dwarf line number information for .export_symbol ignored {standard input}:3102: Warning: dwarf line number information for .export_symbol ignored {standard input}:3105: Warning: dwarf line number information for .export_symbol ignored {standard input}:3106: Warning: dwarf line number information for .export_symbol ignored {standard input}:3110: Warning: dwarf line number information for .export_symbol ignored {standard input}:3114: Warning: dwarf line number information for .export_symbol ignored {standard input}:3115: Warning: dwarf line number information for .export_symbol ignored {standard input}:3116: Warning: dwarf line number information for .export_symbol ignored {standard input}:3118: Warning: dwarf line number information for .export_symbol ignored {standard input}:3123: Warning: dwarf line number information for .export_symbol ignored {standard input}:3124: Warning: dwarf line number information for .export_symbol ignored {standard input}:3126: Warning: dwarf line number information for .export_symbol ignored {standard input}:3127: Warning: dwarf line number information for .export_symbol ignored {standard input}:3129: Warning: dwarf line number information for .export_symbol ignored {standard input}:3131: Warning: dwarf line number information for .export_symbol ignored {standard input}:3133: Warning: dwarf line number information for .export_symbol ignored {standard input}:3143: Warning: dwarf line number information for .export_symbol ignored {standard input}:3144: Warning: dwarf line number information for .export_symbol ignored {standard input}:3148: Warning: dwarf line number information for .export_symbol ignored {standard input}:3150: Warning: dwarf line number information for .export_symbol ignored {standard input}:3152: Warning: dwarf line number information for .export_symbol ignored {standard input}:3155: Warning: dwarf line number information for .export_symbol ignored {standard input}:3156: Warning: dwarf line number information for .export_symbol ignored {standard input}:3162: Warning: dwarf line number information for .export_symbol ignored {standard input}:3173: Warning: dwarf line number information for .export_symbol ignored {standard input}:3174: Warning: dwarf line number information for .export_symbol ignored {standard input}:3178: Warning: dwarf line number information for .export_symbol ignored {standard input}:3179: Warning: dwarf line number information for .export_symbol ignored {standard input}:3181: Warning: dwarf line number information for .export_symbol ignored {standard input}:3185: Warning: dwarf line number information for .export_symbol ignored {standard input}:3189: Warning: dwarf line number information for .export_symbol ignored {standard input}:3191: Warning: dwarf line number information for .export_symbol ignored {standard input}:3193: Warning: dwarf line number information for .export_symbol ignored {standard input}:3197: Warning: dwarf line number information for .export_symbol ignored {standard input}:3198: Warning: dwarf line number information for .export_symbol ignored {standard input}:3199: Warning: dwarf line number information for .export_symbol ignored {standard input}:3201: Warning: dwarf line number information for .export_symbol ignored {standard input}:3205: Warning: dwarf line number information for .export_symbol ignored {standard input}:3211: Warning: dwarf line number information for .export_symbol ignored {standard input}:3215: Warning: dwarf line number information for .export_symbol ignored {standard input}:3219: Warning: dwarf line number information for .export_symbol ignored {standard input}:3220: Warning: dwarf line number information for .export_symbol ignored {standard input}:3268: Warning: dwarf line number information for .export_symbol ignored {standard input}:3313: Warning: dwarf line number information for .export_symbol ignored {standard input}:3314: Warning: dwarf line number information for .export_symbol ignored {standard input}:3317: Warning: dwarf line number information for .export_symbol ignored {standard input}:3318: Warning: dwarf line number information for .export_symbol ignored {standard input}:3320: Warning: dwarf line number information for .export_symbol ignored {standard input}:3322: Warning: dwarf line number information for .export_symbol ignored {standard input}:3324: Warning: dwarf line number information for .export_symbol ignored {standard input}:3326: Warning: dwarf line number information for .export_symbol ignored {standard input}:3328: Warning: dwarf line number information for .export_symbol ignored {standard input}:3330: Warning: dwarf line number information for .export_symbol ignored {standard input}:3332: Warning: dwarf line number information for .export_symbol ignored {standard input}:3334: Warning: dwarf line number information for .export_symbol ignored {standard input}:3336: Warning: dwarf line number information for .export_symbol ignored {standard input}:3337: Warning: dwarf line number information for .export_symbol ignored {standard input}:3338: Warning: dwarf line number information for .export_symbol ignored {standard input}:3339: Warning: dwarf line number information for .export_symbol ignored {standard input}:3340: Warning: dwarf line number information for .export_symbol ignored {standard input}:3341: Warning: dwarf line number information for .export_symbol ignored {standard input}:3342: Warning: dwarf line number information for .export_symbol ignored {standard input}:3344: Warning: dwarf line number information for .export_symbol ignored {standard input}:3349: Warning: dwarf line number information for .export_symbol ignored {standard input}:3354: Warning: dwarf line number information for .export_symbol ignored {standard input}:3355: Warning: dwarf line number information for .export_symbol ignored {standard input}:3357: Warning: dwarf line number information for .export_symbol ignored {standard input}:3359: Warning: dwarf line number information for .export_symbol ignored {standard input}:3361: Warning: dwarf line number information for .export_symbol ignored {standard input}:3362: Warning: dwarf line number information for .export_symbol ignored {standard input}:3364: Warning: dwarf line number information for .export_symbol ignored {standard input}:3365: Warning: dwarf line number information for .export_symbol ignored {standard input}:3367: Warning: dwarf line number information for .export_symbol ignored {standard input}:3368: Warning: dwarf line number information for .export_symbol ignored {standard input}:3370: Warning: dwarf line number information for .export_symbol ignored {standard input}:3371: Warning: dwarf line number information for .export_symbol ignored {standard input}:3374: Warning: dwarf line number information for .export_symbol ignored {standard input}:3377: Warning: dwarf line number information for .export_symbol ignored {standard input}:3379: Warning: dwarf line number information for .export_symbol ignored {standard input}:3384: Warning: dwarf line number information for .export_symbol ignored {standard input}:3390: Warning: dwarf line number information for .export_symbol ignored {standard input}:3391: Warning: dwarf line number information for .export_symbol ignored {standard input}:3395: Warning: dwarf line number information for .export_symbol ignored {standard input}:3396: Warning: dwarf line number information for .export_symbol ignored {standard input}:3405: Warning: dwarf line number information for .export_symbol ignored {standard input}:3409: Warning: dwarf line number information for .export_symbol ignored {standard input}:3412: Warning: dwarf line number information for .export_symbol ignored {standard input}:3414: Warning: dwarf line number information for .export_symbol ignored {standard input}:3416: Warning: dwarf line number information for .export_symbol ignored {standard input}:3420: Warning: dwarf line number information for .export_symbol ignored {standard input}:3423: Warning: dwarf line number information for .export_symbol ignored {standard input}:3426: Warning: dwarf line number information for .export_symbol ignored
--
{standard input}:4867: Warning: dwarf line number information for .export_symbol ignored {standard input}:4869: Warning: dwarf line number information for .export_symbol ignored {standard input}:4872: Warning: dwarf line number information for .export_symbol ignored {standard input}:4873: Warning: dwarf line number information for .export_symbol ignored {standard input}:4875: Warning: dwarf line number information for .export_symbol ignored {standard input}:4876: Warning: dwarf line number information for .export_symbol ignored {standard input}:4882: Warning: dwarf line number information for .export_symbol ignored {standard input}:4884: Warning: dwarf line number information for .export_symbol ignored {standard input}:4886: Warning: dwarf line number information for .export_symbol ignored {standard input}:4887: Warning: dwarf line number information for .export_symbol ignored {standard input}:4888: Warning: dwarf line number information for .export_symbol ignored {standard input}:4891: Warning: dwarf line number information for .export_symbol ignored {standard input}:4892: Warning: dwarf line number information for .export_symbol ignored {standard input}:4895: Warning: dwarf line number information for .export_symbol ignored {standard input}:4896: Warning: dwarf line number information for .export_symbol ignored {standard input}:4897: Warning: dwarf line number information for .export_symbol ignored {standard input}:4905: Warning: dwarf line number information for .export_symbol ignored {standard input}:4906: Warning: dwarf line number information for .export_symbol ignored {standard input}:4909: Warning: dwarf line number information for .export_symbol ignored {standard input}:4910: Warning: dwarf line number information for .export_symbol ignored {standard input}:4913: Warning: dwarf line number information for .export_symbol ignored {standard input}:4917: Warning: dwarf line number information for .export_symbol ignored {standard input}:4919: Warning: dwarf line number information for .export_symbol ignored {standard input}:4920: Warning: dwarf line number information for .export_symbol ignored {standard input}:4922: Warning: dwarf line number information for .export_symbol ignored {standard input}:4923: Warning: dwarf line number information for .export_symbol ignored {standard input}:4925: Warning: dwarf line number information for .export_symbol ignored {standard input}:4926: Warning: dwarf line number information for .export_symbol ignored {standard input}:4927: Warning: dwarf line number information for .export_symbol ignored {standard input}:4929: Warning: dwarf line number information for .export_symbol ignored {standard input}:4930: Warning: dwarf line number information for .export_symbol ignored {standard input}:4933: Warning: dwarf line number information for .export_symbol ignored {standard input}:4936: Warning: dwarf line number information for .export_symbol ignored {standard input}:4939: Warning: dwarf line number information for .export_symbol ignored {standard input}:4942: Warning: dwarf line number information for .export_symbol ignored {standard input}:4944: Warning: dwarf line number information for .export_symbol ignored {standard input}:4945: Warning: dwarf line number information for .export_symbol ignored {standard input}:4948: Warning: dwarf line number information for .export_symbol ignored {standard input}:4950: Warning: dwarf line number information for .export_symbol ignored {standard input}:4952: Warning: dwarf line number information for .export_symbol ignored {standard input}:4954: Warning: dwarf line number information for .export_symbol ignored {standard input}:4956: Warning: dwarf line number information for .export_symbol ignored {standard input}:4957: Warning: dwarf line number information for .export_symbol ignored {standard input}:4959: Warning: dwarf line number information for .export_symbol ignored {standard input}:4961: Warning: dwarf line number information for .export_symbol ignored {standard input}:4963: Warning: dwarf line number information for .export_symbol ignored {standard input}:4965: Warning: dwarf line number information for .export_symbol ignored {standard input}:4967: Warning: dwarf line number information for .export_symbol ignored {standard input}:4968: Warning: dwarf line number information for .export_symbol ignored {standard input}:4970: Warning: dwarf line number information for .export_symbol ignored {standard input}:4972: Warning: dwarf line number information for .export_symbol ignored {standard input}:4974: Warning: dwarf line number information for .export_symbol ignored {standard input}:4976: Warning: dwarf line number information for .export_symbol ignored {standard input}:4978: Warning: dwarf line number information for .export_symbol ignored {standard input}:4979: Warning: dwarf line number information for .export_symbol ignored {standard input}:4982: Warning: dwarf line number information for .export_symbol ignored {standard input}:4985: Warning: dwarf line number information for .export_symbol ignored {standard input}:4987: Warning: dwarf line number information for .export_symbol ignored {standard input}:4989: Warning: dwarf line number information for .export_symbol ignored {standard input}:4990: Warning: dwarf line number information for .export_symbol ignored {standard input}:4992: Warning: dwarf line number information for .export_symbol ignored {standard input}:4994: Warning: dwarf line number information for .export_symbol ignored {standard input}:4996: Warning: dwarf line number information for .export_symbol ignored {standard input}:4998: Warning: dwarf line number information for .export_symbol ignored {standard input}:5000: Warning: dwarf line number information for .export_symbol ignored {standard input}:5001: Warning: dwarf line number information for .export_symbol ignored {standard input}:5003: Warning: dwarf line number information for .export_symbol ignored {standard input}:5005: Warning: dwarf line number information for .export_symbol ignored {standard input}:5007: Warning: dwarf line number information for .export_symbol ignored {standard input}:5009: Warning: dwarf line number information for .export_symbol ignored {standard input}:5011: Warning: dwarf line number information for .export_symbol ignored {standard input}:5012: Warning: dwarf line number information for .export_symbol ignored {standard input}:5014: Warning: dwarf line number information for .export_symbol ignored {standard input}:5016: Warning: dwarf line number information for .export_symbol ignored {standard input}:5018: Warning: dwarf line number information for .export_symbol ignored {standard input}:5021: Warning: dwarf line number information for .export_symbol ignored {standard input}:5023: Warning: dwarf line number information for .export_symbol ignored {standard input}:5026: Warning: dwarf line number information for .export_symbol ignored {standard input}:5027: Warning: dwarf line number information for .export_symbol ignored {standard input}:5030: Warning: dwarf line number information for .export_symbol ignored {standard input}:5033: Warning: dwarf line number information for .export_symbol ignored {standard input}:5035: Warning: dwarf line number information for .export_symbol ignored {standard input}:5036: Warning: dwarf line number information for .export_symbol ignored {standard input}:5039: Warning: dwarf line number information for .export_symbol ignored {standard input}:5042: Warning: dwarf line number information for .export_symbol ignored {standard input}:5043: Warning: dwarf line number information for .export_symbol ignored {standard input}:5044: Warning: dwarf line number information for .export_symbol ignored {standard input}:5048: Warning: dwarf line number information for .export_symbol ignored {standard input}:5050: Warning: dwarf line number information for .export_symbol ignored {standard input}:5051: Warning: dwarf line number information for .export_symbol ignored {standard input}:5055: Warning: dwarf line number information for .export_symbol ignored {standard input}:5056: Warning: dwarf line number information for .export_symbol ignored {standard input}:5058: Warning: dwarf line number information for .export_symbol ignored {standard input}:5063: Warning: dwarf line number information for .export_symbol ignored {standard input}:5064: Warning: dwarf line number information for .export_symbol ignored {standard input}:5066: Warning: dwarf line number information for .export_symbol ignored {standard input}:5068: Warning: dwarf line number information for .export_symbol ignored {standard input}:5069: Warning: dwarf line number information for .export_symbol ignored {standard input}:5072: Warning: dwarf line number information for .export_symbol ignored {standard input}:5073: Warning: dwarf line number information for .export_symbol ignored
>> arch/arc/include/asm/bitops.h:31: Warning: dwarf line number information for .export_symbol ignored
{standard input}:5085: Warning: dwarf line number information for .export_symbol ignored {standard input}:5086: Warning: dwarf line number information for .export_symbol ignored {standard input}:5089: Warning: dwarf line number information for .export_symbol ignored {standard input}:5090: Warning: dwarf line number information for .export_symbol ignored {standard input}:5092: Warning: dwarf line number information for .export_symbol ignored {standard input}:5095: Warning: dwarf line number information for .export_symbol ignored {standard input}:5096: Warning: dwarf line number information for .export_symbol ignored {standard input}:5098: Warning: dwarf line number information for .export_symbol ignored {standard input}:5100: Warning: dwarf line number information for .export_symbol ignored {standard input}:5102: Warning: dwarf line number information for .export_symbol ignored {standard input}:5106: Warning: dwarf line number information for .export_symbol ignored {standard input}:5107: Warning: dwarf line number information for .export_symbol ignored {standard input}:5108: Warning: dwarf line number information for .export_symbol ignored {standard input}:5109: Warning: dwarf line number information for .export_symbol ignored {standard input}:5110: Warning: dwarf line number information for .export_symbol ignored {standard input}:5112: Warning: dwarf line number information for .export_symbol ignored {standard input}:5114: Warning: dwarf line number information for .export_symbol ignored {standard input}:5116: Warning: dwarf line number information for .export_symbol ignored {standard input}:5119: Warning: dwarf line number information for .export_symbol ignored {standard input}:5120: Warning: dwarf line number information for .export_symbol ignored {standard input}:5126: Warning: dwarf line number information for .export_symbol ignored {standard input}:5127: Warning: dwarf line number information for .export_symbol ignored {standard input}:5129: Warning: dwarf line number information for .export_symbol ignored {standard input}:5130: Warning: dwarf line number information for .export_symbol ignored {standard input}:5132: Warning: dwarf line number information for .export_symbol ignored {standard input}:5137: Warning: dwarf line number information for .export_symbol ignored {standard input}:5139: Warning: dwarf line number information for .export_symbol ignored {standard input}:5140: Warning: dwarf line number information for .export_symbol ignored {standard input}:5142: Warning: dwarf line number information for .export_symbol ignored {standard input}:5144: Warning: dwarf line number information for .export_symbol ignored {standard input}:5146: Warning: dwarf line number information for .export_symbol ignored {standard input}:5148: Warning: dwarf line number information for .export_symbol ignored {standard input}:5152: Warning: dwarf line number information for .export_symbol ignored {standard input}:5153: Warning: dwarf line number information for .export_symbol ignored {standard input}:5157: Warning: dwarf line number information for .export_symbol ignored {standard input}:5161: Warning: dwarf line number information for .export_symbol ignored {standard input}:5167: Warning: dwarf line number information for .export_symbol ignored {standard input}:5168: Warning: dwarf line number information for .export_symbol ignored {standard input}:5173: Warning: dwarf line number information for .export_symbol ignored {standard input}:5177: Warning: dwarf line number information for .export_symbol ignored {standard input}:5182: Warning: dwarf line number information for .export_symbol ignored {standard input}:5183: Warning: dwarf line number information for .export_symbol ignored {standard input}:5184: Warning: dwarf line number information for .export_symbol ignored {standard input}:5185: Warning: dwarf line number information for .export_symbol ignored {standard input}:5187: Warning: dwarf line number information for .export_symbol ignored {standard input}:5188: Warning: dwarf line number information for .export_symbol ignored {standard input}:5191: Warning: dwarf line number information for .export_symbol ignored {standard input}:5195: Warning: dwarf line number information for .export_symbol ignored {standard input}:5200: Warning: dwarf line number information for .export_symbol ignored {standard input}:5201: Warning: dwarf line number information for .export_symbol ignored {standard input}:5202: Warning: dwarf line number information for .export_symbol ignored {standard input}:5204: Warning: dwarf line number information for .export_symbol ignored {standard input}:5210: Warning: dwarf line number information for .export_symbol ignored {standard input}:5212: Warning: dwarf line number information for .export_symbol ignored {standard input}:5213: Warning: dwarf line number information for .export_symbol ignored {standard input}:5214: Warning: dwarf line number information for .export_symbol ignored {standard input}:5215: Warning: dwarf line number information for .export_symbol ignored {standard input}:5219: Warning: dwarf line number information for .export_symbol ignored {standard input}:5223: Warning: dwarf line number information for .export_symbol ignored {standard input}:5229: Warning: dwarf line number information for .export_symbol ignored {standard input}:5234: Warning: dwarf line number information for .export_symbol ignored {standard input}:5236: Warning: dwarf line number information for .export_symbol ignored {standard input}:5242: Warning: dwarf line number information for .export_symbol ignored {standard input}:5245: Warning: dwarf line number information for .export_symbol ignored {standard input}:5246: Warning: dwarf line number information for .export_symbol ignored {standard input}:5252: Warning: dwarf line number information for .export_symbol ignored {standard input}:5253: Warning: dwarf line number information for .export_symbol ignored {standard input}:5254: Warning: dwarf line number information for .export_symbol ignored {standard input}:5258: Warning: dwarf line number information for .export_symbol ignored {standard input}:5259: Warning: dwarf line number information for .export_symbol ignored {standard input}:5261: Warning: dwarf line number information for .export_symbol ignored {standard input}:5262: Warning: dwarf line number information for .export_symbol ignored {standard input}:5264: Warning: dwarf line number information for .export_symbol ignored {standard input}:5266: Warning: dwarf line number information for .export_symbol ignored {standard input}:5268: Warning: dwarf line number information for .export_symbol ignored {standard input}:5274: Warning: dwarf line number information for .export_symbol ignored {standard input}:5275: Warning: dwarf line number information for .export_symbol ignored {standard input}:5279: Warning: dwarf line number information for .export_symbol ignored {standard input}:5281: Warning: dwarf line number information for .export_symbol ignored {standard input}:5283: Warning: dwarf line number information for .export_symbol ignored {standard input}:5284: Warning: dwarf line number information for .export_symbol ignored {standard input}:5286: Warning: dwarf line number information for .export_symbol ignored {standard input}:5287: Warning: dwarf line number information for .export_symbol ignored {standard input}:5289: Warning: dwarf line number information for .export_symbol ignored {standard input}:5290: Warning: dwarf line number information for .export_symbol ignored {standard input}:5292: Warning: dwarf line number information for .export_symbol ignored {standard input}:5293: Warning: dwarf line number information for .export_symbol ignored {standard input}:5294: Warning: dwarf line number information for .export_symbol ignored {standard input}:5299: Warning: dwarf line number information for .export_symbol ignored {standard input}:5300: Warning: dwarf line number information for .export_symbol ignored {standard input}:5301: Warning: dwarf line number information for .export_symbol ignored {standard input}:5306: Warning: dwarf line number information for .export_symbol ignored {standard input}:5307: Warning: dwarf line number information for .export_symbol ignored {standard input}:5309: Warning: dwarf line number information for .export_symbol ignored {standard input}:5311: Warning: dwarf line number information for .export_symbol ignored {standard input}:5315: Warning: dwarf line number information for .export_symbol ignored {standard input}:5316: Warning: dwarf line number information for .export_symbol ignored {standard input}:5318: Warning: dwarf line number information for .export_symbol ignored {standard input}:5323: Warning: dwarf line number information for .export_symbol ignored {standard input}:5324: Warning: dwarf line number information for .export_symbol ignored
..
vim +31 arch/arc/include/asm/bitops.h
1f6ccfff631467 Vineet Gupta 2013-05-13 19
14e968bad788de Vineet Gupta 2013-01-18 20 /*
14e968bad788de Vineet Gupta 2013-01-18 21 * Count the number of zeros, starting from MSB
14e968bad788de Vineet Gupta 2013-01-18 22 * Helper for fls( ) friends
14e968bad788de Vineet Gupta 2013-01-18 23 * This is a pure count, so (1-32) or (0-31) doesn't apply
14e968bad788de Vineet Gupta 2013-01-18 24 * It could be 0 to 32, based on num of 0's in there
14e968bad788de Vineet Gupta 2013-01-18 25 * clz(0x8000_0000) = 0, clz(0xFFFF_FFFF)=0, clz(0) = 32, clz(1) = 31
14e968bad788de Vineet Gupta 2013-01-18 26 */
14e968bad788de Vineet Gupta 2013-01-18 27 static inline __attribute__ ((const)) int clz(unsigned int x)
14e968bad788de Vineet Gupta 2013-01-18 28 {
14e968bad788de Vineet Gupta 2013-01-18 29 unsigned int res;
14e968bad788de Vineet Gupta 2013-01-18 30
14e968bad788de Vineet Gupta 2013-01-18 @31 __asm__ __volatile__(
14e968bad788de Vineet Gupta 2013-01-18 32 " norm.f %0, %1 \n"
14e968bad788de Vineet Gupta 2013-01-18 33 " mov.n %0, 0 \n"
14e968bad788de Vineet Gupta 2013-01-18 34 " add.p %0, %0, 1 \n"
14e968bad788de Vineet Gupta 2013-01-18 35 : "=r"(res)
14e968bad788de Vineet Gupta 2013-01-18 36 : "r"(x)
14e968bad788de Vineet Gupta 2013-01-18 37 : "cc");
14e968bad788de Vineet Gupta 2013-01-18 38
14e968bad788de Vineet Gupta 2013-01-18 39 return res;
14e968bad788de Vineet Gupta 2013-01-18 40 }
14e968bad788de Vineet Gupta 2013-01-18 41 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
Quoted 18 lines · kernel test robot
Hi Masahiro,
kernel test robot noticed the following build errors:
[auto build test ERROR on masahiroy-kbuild/for-next]
[also build test ERROR on next-20230609]
[cannot apply to masahiroy-kbuild/fixes arnd-asm-generic/master rafael-pm/linux-next linus/master v6.4-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]url: https://github.com/intel-lab-lkp/linux/commits/Masahiro-Yamada/Revert-PATCH-uml-export-symbols-added-by-GCC-hardened/20230610-171620 base: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next patch link: https://lore.kernel.org/r/20230610091320.1054554-9-masahiroy%40kernel.org patch subject: [PATCH v8 08/11] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion config: arc-randconfig-r035-20230610 (https://download.01.org/0day-ci/archive/20230611/[email protected]/config) compiler: arceb-elf-gcc (GCC) 12.3.0
Quoted 13 lines
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add masahiroy-kbuild https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
git fetch masahiroy-kbuild for-next
git checkout masahiroy-kbuild/for-next
b4 shazam https://lore.kernel.org/r/[email protected]
# save the config file
mkdirbuild_dir&& cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/basharch/arc/kernel/drivers/infiniband/core/drivers/media/dvb-core/drivers/mtd/chips/fs/io_uring/kernel/lib/mm/net/802/net/core/net/ethernet/net/ipv4/net/ipv6/net/llc/net/netfilter/net/rxrpc/net/sched/net/wireless/net/xfrm/security/keys/
This is a bug of 03/11.
For most architectures, a semicolon works as an instruction separator, but for ARC, it is the start of a comment.
I will fix it in v9.
--
Best Regards
Masahiro Yamada
PATCH v8 9/11 modpost: merge two similar section mismatch warnings
In reply to Masahiro YamadaIn case of section mismatch, modpost shows slightly different messages.
For extable section mismatch:
"%s(%s+0x%lx): Section mismatch in reference to the %s:%s\n"
For the other cases:
"%s: section mismatch in reference: %s (section: %s) -> %s (section: %s)\n"
They are similar. Merge them.
---
scripts/mod/modpost.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)
scripts/mod/modpost.c +3 -15
@@ -1147,21 +1147,10 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf, sec_mismatch_count++; -switch (mismatch->mismatch) { -case TEXT_TO_ANY_INIT : -case DATA_TO_ANY_INIT : -case TEXTDATA_TO_ANY_EXIT : -case XXXINIT_TO_SOME_INIT : -case XXXEXIT_TO_SOME_EXIT : -case ANY_INIT_TO_ANY_EXIT : -case ANY_EXIT_TO_ANY_INIT : -warn ("%s: section mismatch in reference: %s (section: %s) -> %s (section: %s)\n" , - modname, fromsym, fromsec, tosym, tosec); -break ; -case EXTABLE_TO_NON_TEXT : -warn ("%s(%s+0x%lx): Section mismatch in reference to the %s:%s\n" , - modname, fromsec, (long )faddr, tosec, tosym); +warn ("%s: section mismatch in reference: %s (section: %s) -> %s (section: %s)\n" , + modname, fromsym, fromsec, tosym, tosec); +if (mismatch->mismatch ==EXTABLE_TO_NON_TEXT ) {if (match (tosec, mismatch->bad_tosec))fatal ("The relocation at %s+0x%lx references\n" "section \"%s\" which is black-listed.\n"
@@ -1181,7 +1170,6 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,else error ("%s+0x%lx references non-executable section '%s'\n" , fromsec, (long )faddr, tosec); -break ; } }
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 10/11 modpost: show offset from symbol for section mismatch warnings
In reply to Masahiro YamadaCurrently, modpost only shows the symbol names and section names, so it repeats the same message if there are multiple relocations in the same symbol. It is common the relocation spans across multiple instructions.
It is better to show the offset from the symbol.
---
scripts/mod/modpost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/mod/modpost.c +2 -2
@@ -1147,8 +1147,8 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf, sec_mismatch_count++; -warn ("%s: section mismatch in reference: %s (section: %s) -> %s (section: %s)\n" , - modname, fromsym, fromsec, tosym, tosec); +warn ("%s: section mismatch in reference: %s+0x%x (section: %s) -> %s (section: %s)\n" , + modname, fromsym, (unsigned int )(faddr - from->st_value), fromsec, tosym, tosec);if (mismatch->mismatch ==EXTABLE_TO_NON_TEXT ) {if (match (tosec, mismatch->bad_tosec))
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
PATCH v8 11/11 linux/export.h: rename 'sec' argument to 'license'
In reply to Masahiro YamadaNow, EXPORT_SYMBOL() is populated in two stages. In the first stage, all of EXPORT_SYMBOL/EXPORT_SYMBOL_GPL go into the same section, '.export_symbol'.
'sec' does not make sense any more. Rename it to 'license'.
---
(no changes since v7)
Changes in v7:
- New patch
include/linux/export.h | 8 ++++---- include/linux/pm.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-)
include/linux/export.h +4 -4
@@ -51,11 +51,11 @@ extern struct module __this_module;* be reused in other execution contexts such as the UEFI stub or the * decompressor. */ -#define __EXPORT_SYMBOL (sym, sec, ns) +#define __EXPORT_SYMBOL (sym, license, ns)#elif defined(__GENKSYMS__) -#define __EXPORT_SYMBOL (sym, sec, ns) __GENKSYMS_EXPORT_SYMBOL(sym) +#define __EXPORT_SYMBOL (sym, license, ns) __GENKSYMS_EXPORT_SYMBOL(sym)#elif defined(__ASSEMBLY__)
@@ -72,9 +72,9 @@ extern struct module __this_module;#endif /* CONFIG_MODULES */ #ifdef DEFAULT_SYMBOL_NAMESPACE -#define _EXPORT_SYMBOL (sym, sec) __EXPORT_SYMBOL(sym, sec, __stringify(DEFAULT_SYMBOL_NAMESPACE)) +#define _EXPORT_SYMBOL (sym, license) __EXPORT_SYMBOL(sym, license, __stringify(DEFAULT_SYMBOL_NAMESPACE))#else -#define _EXPORT_SYMBOL (sym, sec) __EXPORT_SYMBOL(sym, sec, "") +#define _EXPORT_SYMBOL (sym, license) __EXPORT_SYMBOL(sym, license, "")#endif #define EXPORT_SYMBOL (sym) _EXPORT_SYMBOL(sym,)
include/linux/pm.h +3 -3
@@ -375,14 +375,14 @@ const struct dev_pm_ops name = { \ }#ifdef CONFIG_PM -#define _EXPORT_DEV_PM_OPS (name, sec, ns) \ +#define _EXPORT_DEV_PM_OPS (name, license, ns) \ const struct dev_pm_ops name; \ - __EXPORT_SYMBOL(name, sec, ns); \ + __EXPORT_SYMBOL(name, license, ns); \ const struct dev_pm_ops name#define EXPORT_PM_FN_GPL (name) EXPORT_SYMBOL_GPL(name)#define EXPORT_PM_FN_NS_GPL (name, ns) EXPORT_SYMBOL_NS_GPL(name, ns)#else -#define _EXPORT_DEV_PM_OPS (name, sec, ns) \ +#define _EXPORT_DEV_PM_OPS (name, license, ns) \ static __maybe_unused const struct dev_pm_ops __static_##name#define EXPORT_PM_FN_GPL (name)#define EXPORT_PM_FN_NS_GPL (name, ns)
Signature · 7 lines
2.39.2 _______________________________________________ linux-um mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-um
Quoted 4 lines · Masahiro Yamada
This patch set refactors modpost first to make it easier to add new code.
Only the first patch was applied.
(https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/)
I will send v9 for the rest because
the 0day bot reported a couple of issues.
Signature · 2 lines
Best Regards Masahiro Yamada