From 6243c1d02c17439c278d40fce0d22d397dd24deb Mon Sep 17 00:00:00 2001 From: Camille BRUGEL Date: Sat, 3 Dec 2022 18:13:57 +0100 Subject: [PATCH] Add limitations section to Linking.md to clarify element and data segment indices renumbering is not supported (#193) --- Linking.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Linking.md b/Linking.md index 08160a3..6e8db17 100644 --- a/Linking.md +++ b/Linking.md @@ -24,7 +24,7 @@ tasks need to be performed: - Merging of globals sections (re-numbering globals) - Merging of event sections (re-numbering events) - Merging of table sections (re-numbering tables) -- Merging of data segments (re-positioning data) +- Merging of data segments (re-positioning data with [limitations](#limitations)) - Resolving undefined external references - Synthesizing functions to call constructors and perform other initialization @@ -686,3 +686,12 @@ have its address computed as follows: The variable can then be used as normal. Upon thread exit, the runtime should free the memory allocated for the TLS block. + +### Limitations + +Note data segments are only re-positioned, i.e. only the offsets of active data +elements can be updated. There are no relocation type for data segments indices +such that instructions like `data.drop` or `memory.init` are not supported. + +Similarly, there is no relocation type for element segments and the instructions +`elem.drop` and `table.init` are not supported.