commit 2b48a20f733f2ce8120279540ae6522fe0527001
parent 22f1efd015b054f7a52916d37c62d9930184ac29
Author: William Casarin <jb55@jb55.com>
Date: Thu, 15 Jul 2021 10:22:12 -0700
use was_section_parsed for start function lookup
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/wasm.c b/src/wasm.c
@@ -2718,9 +2718,8 @@ static int find_function(struct module *module, const char *name)
static int find_start_function(struct module *module)
{
- if (module->parsed & (1 << section_start)) {
+ if (was_section_parsed(module, section_start))
return module->start_section.start_fn;
- }
return find_function(module, "start") || find_function(module, "_start");
}