diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-05-04 11:46:00 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-05-04 11:46:00 -0700 |
commit | d0034a7a4ac7fae708146ac0059b9c47a1543f0d (patch) | |
tree | ac3ac88066f0f80632aa754e3ae008994f2426a2 /scripts/mod/modpost.h | |
parent | 56cfe6f820a6315291eb5a1b82bb49633b993d3b (diff) | |
parent | d12b64b9764ea17554fb230784ebf91287ed807e (diff) |
Merge branch 'next' into for-linus
Prepare input updates for 5.13 merge window.
Diffstat (limited to 'scripts/mod/modpost.h')
-rw-r--r-- | scripts/mod/modpost.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index e6f46eee0af0..c1a895c0d682 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -2,6 +2,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> +#include <stdbool.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> @@ -139,10 +140,7 @@ struct elf_info { Elf_Sym *symtab_start; Elf_Sym *symtab_stop; Elf_Section export_sec; - Elf_Section export_unused_sec; Elf_Section export_gpl_sec; - Elf_Section export_unused_gpl_sec; - Elf_Section export_gpl_future_sec; char *strtab; char *modinfo; unsigned int modinfo_len; @@ -180,6 +178,14 @@ static inline unsigned int get_secindex(const struct elf_info *info, return info->symtab_shndx_start[sym - info->symtab_start]; } +static inline bool strends(const char *str, const char *postfix) +{ + if (strlen(str) < strlen(postfix)) + return false; + + return strcmp(str + strlen(str) - strlen(postfix), postfix) == 0; +} + /* file2alias.c */ extern unsigned int cross_build; void handle_moddevtable(struct module *mod, struct elf_info *info, |