@@ -150,7 +150,8 @@ The current list of valid `type` codes are:
150
150
- ` 5 / WASM_SEGMENT_INFO ` - Extra metadata about the data segments.
151
151
152
152
- ` 6 / WASM_INIT_FUNCS ` - Specifies a list of constructor functions to be called
153
- at startup time.
153
+ at startup. These constructors will be called in priority order after memory
154
+ has been initialized.
154
155
155
156
- ` 7 / WASM_COMDAT_INFO ` - Specifies the COMDAT groups of associated linking
156
157
objects, which are linked only once and all together.
@@ -359,7 +360,8 @@ linked output.
359
360
360
361
Segments are merged according their type: segments with a common prefix such as
361
362
` .data ` or ` .rodata ` are merged into a single segment in the output data
362
- section.
363
+ section. It is an error if this behavior would merge shared and unshared
364
+ segments.
363
365
364
366
The output data section is formed, essentially, by concatenating the data
365
367
sections of the input files. Since the final location in linear memory of any
@@ -370,10 +372,21 @@ which reference a data symbol.
370
372
Segments are linked as a whole, and a segment is either entirely included or
371
373
excluded from the link.
372
374
373
- Mergin Custom Sections
375
+ Merging Memory Sections
376
+ -----------------------
377
+
378
+ It is an error to link together object files with shared and unshared
379
+ memories. Object files with unshared memories are produced by tools that are not
380
+ aware of WebAssembly threads or are configured to produce code for a
381
+ single-threaded environment. These objects may have been compiled from
382
+ thread-aware source code but had their atomic operations stripped, so it would
383
+ be dangerous to allow users to accidentally link these objects together with
384
+ properly thread-aware objects.
385
+
386
+ Merging Custom Sections
374
387
----------------------
375
388
376
- Mergin of custom sections is performed by concatenating all payloads for the
389
+ Merging of custom sections is performed by concatenating all payloads for the
377
390
customs sections with the same name. The section symbol will refer the resulting
378
391
section, this means that the relocation entries addend that refer
379
392
the referred custom section fields shall be adjusted to take new offset
0 commit comments