#include <stdbool.h>
 #include <errno.h>
 #include "modpost.h"
-#include "../../include/generated/autoconf.h"
 #include "../../include/linux/license.h"
-#include "../../include/linux/export.h"
 
 /* Are we using CONFIG_MODVERSIONS? */
 static int modversions = 0;
 static int ignore_undef_symbol(struct elf_info *info, const char *symname)
 {
        /* ignore __this_module, it will be resolved shortly */
-       if (strcmp(symname, VMLINUX_SYMBOL_STR(__this_module)) == 0)
+       if (strcmp(symname, "__this_module") == 0)
                return 1;
        /* ignore global offset table */
        if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
        return 0;
 }
 
-#define CRC_PFX     VMLINUX_SYMBOL_STR(__crc_)
-#define KSYMTAB_PFX VMLINUX_SYMBOL_STR(__ksymtab_)
-
 static void handle_modversions(struct module *mod, struct elf_info *info,
                               Elf_Sym *sym, const char *symname)
 {
                export = export_from_sec(info, get_secindex(info, sym));
 
        /* CRC'd symbol */
-       if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
+       if (strncmp(symname, "__crc_", strlen("__crc_")) == 0) {
                is_crc = true;
                crc = (unsigned int) sym->st_value;
                if (sym->st_shndx != SHN_UNDEF && sym->st_shndx != SHN_ABS) {
                                info->sechdrs[sym->st_shndx].sh_addr : 0);
                        crc = *crcp;
                }
-               sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
+               sym_update_crc(symname + strlen("__crc_"), mod, crc,
                                export);
        }
 
                }
 #endif
 
-#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX
-               if (symname[0] != '_')
-                       break;
-               else
-                       symname++;
-#endif
                if (is_crc) {
                        const char *e = is_vmlinux(mod->name) ?"":".ko";
-                       warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", symname + strlen(CRC_PFX), mod->name, e);
+                       warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n",
+                            symname + strlen("__crc_"), mod->name, e);
                }
                mod->unres = alloc_symbol(symname,
                                          ELF_ST_BIND(sym->st_info) == STB_WEAK,
                break;
        default:
                /* All exported symbols */
-               if (strncmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) {
-                       sym_add_exported(symname + strlen(KSYMTAB_PFX), mod,
+               if (strncmp(symname, "__ksymtab_", strlen("__ksymtab_")) == 0) {
+                       sym_add_exported(symname + strlen("__ksymtab_"), mod,
                                        export);
                }
-               if (strcmp(symname, VMLINUX_SYMBOL_STR(init_module)) == 0)
+               if (strcmp(symname, "init_module") == 0)
                        mod->has_init = 1;
-               if (strcmp(symname, VMLINUX_SYMBOL_STR(cleanup_module)) == 0)
+               if (strcmp(symname, "cleanup_module") == 0)
                        mod->has_cleanup = 1;
                break;
        }
                        err = 1;
                        break;
                }
-               buf_printf(b, "\t{ %#8x, __VMLINUX_SYMBOL_STR(%s) },\n",
+               buf_printf(b, "\t{ %#8x, \"%s\" },\n",
                           s->crc, s->name);
        }