unsigned int kernel:1;     /* 1 if symbol is from kernel
                                    *  (only for external modules) **/
        unsigned int preloaded:1;  /* 1 if symbol from Module.symvers, or crc */
+       unsigned int is_static:1;  /* 1 if symbol is not global */
        enum export  export;       /* Type of export */
        char name[0];
 };
        strcpy(s->name, name);
        s->weak = weak;
        s->next = next;
+       s->is_static = 1;
        return s;
 }
 
                handle_modversions(mod, &info, sym, symname);
                handle_moddevtable(mod, &info, sym, symname);
        }
+
+       // check for static EXPORT_SYMBOL_* functions && global vars
+       for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
+               unsigned char bind = ELF_ST_BIND(sym->st_info);
+
+               if (bind == STB_GLOBAL || bind == STB_WEAK) {
+                       struct symbol *s =
+                               find_symbol(remove_dot(info.strtab +
+                                                      sym->st_name));
+
+                       if (s)
+                               s->is_static = 0;
+               }
+       }
+
        if (!is_vmlinux(modname) || vmlinux_section_warnings)
                check_sec_ref(mod, modname, &info);
 
                s = sym_add_exported(symname, mod, export_no(export));
                s->kernel    = kernel;
                s->preloaded = 1;
+               s->is_static = 0;
                sym_update_crc(symname, mod, crc, export_no(export));
        }
        release_file(file, size);
        char *dump_write = NULL, *files_source = NULL;
        int opt;
        int err;
+       int n;
        struct ext_sym_list *extsym_iter;
        struct ext_sym_list *extsym_start = NULL;
 
        if (sec_mismatch_count && sec_mismatch_fatal)
                fatal("modpost: Section mismatches detected.\n"
                      "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n");
+       for (n = 0; n < SYMBOL_HASH_SIZE; n++) {
+               struct symbol *s = symbolhash[n];
+
+               while (s) {
+                       if (s->is_static)
+                               warn("\"%s\" [%s] is a static %s\n",
+                                    s->name, s->module->name,
+                                    export_str(s->export));
+
+                       s = s->next;
+               }
+       }
+
        free(buf.p);
 
        return err;