Closed
Description
The syntax for data segments includes an offset expression:
data::={𝖽𝖺𝗍𝖺 memidx, 𝗈𝖿𝖿𝗌𝖾𝗍 expr, 𝗂𝗇𝗂𝗍 vec(byte)}
Which is described as:
The offset is given by a constant expression.
However, in practice, this can either be a constant, or an (imported) global:
(global $a (import "m" "a") i32)
(data (get_global $a) "abc")
(data (i32.const 25) "abc")
I cannot find the this documented anywhere other than in the unofficial spec:
Metadata
Metadata
Assignees
Labels
No labels