WebAssembly object files will now have an explicit symbol table. This commit is the first of two halves, adding support throughout the code for addressing symbols by index; however, the symbols are still written out using a single import/export (depending on whether defined).
This half of the symbol table work is valid on its own, and the second half doesn't need to be committed immediately after. However, the corresponding LLD change D41955 must be committed simultaneously with this.
Addresses: https://github.com/WebAssembly/tool-conventions/issues/34
Changes:
- For IMPORTs, go back to where we in November! Get rid of "alt index" stuff and don't generate an import for weakly-exported symbols. Now each MCSymbol generates a single import or export (never both) and each import/export generates a single LLD Symbol. Whew!
- Track both "symbol index" and "Wasm index" for each entity. A Wasm function can have more than one symbol attached. Hopefully the naming now avoids any confusion as to what index is referring to what.
- Document new scheme in the headers
I think "either" is not supposed to be here.