Merge tag 'x86_core_for_5.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / scripts / mod / modpost.c
index 09c3ab0..d10f93a 100644 (file)
@@ -658,6 +658,11 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)
                    strstarts(symname, "_savevr_") ||
                    strcmp(symname, ".TOC.") == 0)
                        return 1;
+
+       if (info->hdr->e_machine == EM_S390)
+               /* Expoline thunks are linked on all kernel modules during final link of .ko */
+               if (strstarts(symname, "__s390_indirect_jump_r"))
+                       return 1;
        /* Do not ignore this symbol */
        return 0;
 }
@@ -833,8 +838,10 @@ static int match(const char *sym, const char * const pat[])
 {
        const char *p;
        while (*pat) {
+               const char *endp;
+
                p = *pat++;
-               const char *endp = p + strlen(p) - 1;
+               endp = p + strlen(p) - 1;
 
                /* "*foo*" */
                if (*p == '*' && *endp == '*') {