summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/s2wasm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 3a7cf31db..a45f3aab4 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -1328,11 +1328,12 @@ class S2WasmBuilder {
mustMatch(name.str);
skipComma();
Address size = getInt();
+ Address localAlign = 1;
if (*s == ',') {
skipComma();
- getInt();
+ localAlign = 1 << getInt();
}
- linkerObj->addStatic(size, align, name);
+ linkerObj->addStatic(size, std::max(align, localAlign), name);
}
void skipImports() {