Maybe this is obvious but I can't find it. Linking.md says
offset | varuint32 | offset of the value to rewrite
But is the offset relative to the entire wasm module, or relative to the relevant section? (and if the section, does it include the section ID + LEB size, or is 0 right after that?)
I see
Note that for all relocation types, the bytes being relocated (from offset to offset + 5 for LEB/SLEB relocations or offset + 4 for I32) must lie within the section to which the relocation applies.
If the offset is relative to the whole module, then this sentence makes sense to me. If it's relative to the section, then "must lie within" can only mean they must not be too big as to be past the end of the section, which might be clearer?
Maybe this is obvious but I can't find it. Linking.md says
But is the offset relative to the entire wasm module, or relative to the relevant section? (and if the section, does it include the section ID + LEB size, or is 0 right after that?)
I see
If the offset is relative to the whole module, then this sentence makes sense to me. If it's relative to the section, then "must lie within" can only mean they must not be too big as to be past the end of the section, which might be clearer?