summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/s2wasm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index c192effc2..cc38dd276 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -360,7 +360,11 @@ private:
else if (match("data")) {}
else if (match("ident")) {}
else if (match("section") || match("align")) s = strchr(s, '\n');
- else if (match("globl")) parseGlobl();
+ else if (match("Lfunc_end")) {
+ // skip the next line, which has a .size we can ignore
+ s = strstr(s, ".size");
+ s = strchr(s, '\n');
+ } else if (match("globl")) parseGlobl();
else abort_on("process");
}
}
@@ -882,6 +886,8 @@ private:
s++;
s = strchr(s, '\n');
break; // the function is done
+ } else if (match(".endfunc")) {
+ break; // the function is done
} else {
abort_on("function element");
}