From: Linus Torvalds Date: Sat, 4 Nov 2023 18:07:19 +0000 (-1000) Subject: Merge tag 'kbuild-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5c5e048b2417a56b7b52bdbb66d4fc99d0c20dd2;p=linux.git Merge tag 'kbuild-v6.7' of git://git./linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Implement the binary search in modpost for faster symbol lookup - Respect HOSTCC when linking host programs written in Rust - Change the binrpm-pkg target to generate kernel-devel RPM package - Fix endianness issues for tee and ishtp MODULE_DEVICE_TABLE - Unify vdso_install rules - Remove unused __memexit* annotations - Eliminate stale whitelisting for __devinit/__devexit from modpost - Enable dummy-tools to handle the -fpatchable-function-entry flag - Add 'userldlibs' syntax * tag 'kbuild-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits) kbuild: support 'userldlibs' syntax kbuild: dummy-tools: pretend we understand -fpatchable-function-entry kbuild: Correct missing architecture-specific hyphens modpost: squash ALL_{INIT,EXIT}_TEXT_SECTIONS to ALL_TEXT_SECTIONS modpost: merge sectioncheck table entries regarding init/exit sections modpost: use ALL_INIT_SECTIONS for the section check from DATA_SECTIONS modpost: disallow the combination of EXPORT_SYMBOL and __meminit* modpost: remove EXIT_SECTIONS macro modpost: remove MEM_INIT_SECTIONS macro modpost: remove more symbol patterns from the section check whitelist modpost: disallow *driver to reference .meminit* sections linux/init: remove __memexit* annotations modpost: remove ALL_EXIT_DATA_SECTIONS macro kbuild: simplify cmd_ld_multi_m kbuild: avoid too many execution of scripts/pahole-flags.sh kbuild: remove ARCH_POSTLINK from module builds kbuild: unify no-compiler-targets and no-sync-config-targets kbuild: unify vdso_install rules docs: kbuild: add INSTALL_DTBS_PATH UML: remove unused cmd_vdso_install ... --- 5c5e048b2417a56b7b52bdbb66d4fc99d0c20dd2 diff --cc scripts/mod/modpost.h index 5f94c2c9f2d95,1392afec118cb..69baf014da4fd --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@@ -154,6 -156,28 +156,28 @@@ static inline unsigned int get_secindex return index; } + /* + * If there's no name there, ignore it; likewise, ignore it if it's + * one of the magic symbols emitted used by current tools. + * + * Internal symbols created by tools should be ignored by modpost. + */ -static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym) ++static inline bool is_valid_name(struct elf_info *elf, Elf_Sym *sym) + { + const char *name = elf->strtab + sym->st_name; + + if (!name || !strlen(name)) - return 0; ++ return false; + return !is_mapping_symbol(name); + } + + /* symsearch.c */ + void symsearch_init(struct elf_info *elf); + void symsearch_finish(struct elf_info *elf); + Elf_Sym *symsearch_find_nearest(struct elf_info *elf, Elf_Addr addr, + unsigned int secndx, bool allow_negative, + Elf_Addr min_distance); + /* file2alias.c */ void handle_moddevtable(struct module *mod, struct elf_info *info, Elf_Sym *sym, const char *symname);