@@ -871,18 +871,36 @@ Data imports represented as WebAssembly annotations of the form
871871- ` qualifier ` is one of the allowed qualifiers on a symbol declaration.
872872 Qualifiers may not repeat.
873873
874- | ` <qualifier> ` | effect |
875- | ------------------| ------------------------------------------------------------------------------------------------|
876- | ` weak ` | sets ` WASM_SYM_BINDING_WEAK ` symbol flag |
877- | ` static ` | sets ` WASM_SYM_BINDING_LOCAL ` symbol flag |
878- | ` hidden ` | sets ` WASM_SYM_VISIBILITY_HIDDEN ` symbol flag |
879- | ` retain ` | sets ` WASM_SYM_NO_STRIP ` symbol flag |
880- | ` thread_local ` | sets ` WASM_SYM_TLS ` symbol flag |
881- | ` size=<int> ` | sets symbol's ` size ` appropriately |
882- | ` offset=<int> ` | sets ` WASM_SYM_ABSOLUTE ` symbol flag, sets symbol's ` offset ` appropriately |
883- | ` name=<string> ` | sets ` WASM_SYM_EXPLICIT_NAME ` symbol flag, sets symbol's ` name_len ` , ` name_data ` appropriately |
884- | ` priority=<int> ` | adds symbol to ` WASM_INIT_FUNCS ` section with the given priority |
885- | ` comdat=<id> ` | adds symbol to a ` comdat ` with the given id |
874+ | ` <qualifier> ` | effect |
875+ | ---------------------------| -----------------------------------------------|
876+ | ` binding=<binding> ` | sets symbol flags according to ` <binding> ` |
877+ | ` visibility=<visibility> ` | sets symbol flags according to ` <visibility> ` |
878+ | ` retain ` | sets ` WASM_SYM_NO_STRIP ` symbol flag |
879+ | ` thread_local ` | sets ` WASM_SYM_TLS ` symbol flag |
880+ | ` size=<int> ` | sets symbol's ` size ` appropriately |
881+ | ` offset=<int> ` | sets ` WASM_SYM_ABSOLUTE ` symbol flag, sets symbol's ` offset ` appropriately |
882+ | ` name=<string> ` | sets ` WASM_SYM_EXPLICIT_NAME ` symbol flag, sets symbol's ` name_len ` , ` name_data ` appropriately |
883+ | ` priority=<int> ` | adds symbol to ` WASM_INIT_FUNCS ` section with the given priority |
884+ | ` comdat=<id> ` | adds symbol to a ` comdat ` with the given id |
885+
886+ | ` <binding> ` | flag |
887+ | -------------| --------------------------|
888+ | ` global ` | 0 |
889+ | ` local ` | ` WASM_SYM_BINDING_LOCAL ` |
890+ | ` weak ` | ` WASM_SYM_BINDING_WEAK ` |
891+
892+ | ` <visibility> ` | flag |
893+ | ----------------| ------------------------------|
894+ | ` default ` | |
895+ | ` hidden ` | ` WASM_SYM_VISIBILITY_HIDDEN ` |
896+
897+ Shorthands may be used in place of full qualifiers:
898+
899+ | shorthand | resulting qualifier |
900+ | -----------| ---------------------|
901+ | ` hidden ` | ` visibility=hidden ` |
902+ | ` local ` | ` binding=local ` |
903+ | ` weak ` | ` binding=weak ` |
886904
887905- The ` priority ` qualifier may only be applied to function symbols.
888906- The ` size ` and ` offset ` qualifiers may only be applied to data symbols.
0 commit comments