diff --git a/Makefile b/Makefile index 083ef7aa070d4f..83a557a3d4c1a7 100644 --- a/Makefile +++ b/Makefile @@ -1394,7 +1394,10 @@ archprepare: outputmakefile archheaders archscripts scripts include/config/kerne include/generated/rustc_cfg remove-stale-files prepare0: archprepare +# The WebAssembly image does not use ELF modpost. +ifneq ($(CONFIG_LD_IS_WASMLD),y) $(Q)$(MAKE) $(build)=scripts/mod +endif $(Q)$(MAKE) $(build)=. prepare # All the preparing.. diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c index 225261ed296d6a..e8cee4e4bc733a 100644 --- a/scripts/mod/mk_elfconfig.c +++ b/scripts/mod/mk_elfconfig.c @@ -13,12 +13,6 @@ main(int argc, char **argv) fprintf(stderr, "Error: input truncated\n"); return 1; } - if (memcmp(ei, "\0asm", 4) == 0) { - // TODO(wasm): make mk_elfconfig not run at all - // printf("#pragma once\n" - // "#pragma message \"WebAssembly, not ELF\"\n"); - return 0; - } if (memcmp(ei, ELFMAG, SELFMAG) != 0) { fprintf(stderr, "Error: not ELF\n"); return 1;