Open Quuxplusone opened 5 years ago
I wonder if there's any ar tool that can understand .wasm files and extract public symbol names from them. At least I don't think any existing ar can do that. Doesn't that mean almost all .a files containing .wasm files have no symbol table, no?
llvm-ar can do this. An normally we expect out users to use the same llvm-ar as the version of clang and lld they are using (at least in emscripten).
In the case that they don't do this I think its reasonable to report a warning or at least an error.
With wasm its (as with LTO) its fairly common that the system
ar
tool fail to add a symbol table.Currently we ignore such archives. We should try to do better in some way.
The ELF backend with process individual archive entries if the are all LTO objects.
GNU ld will bail out with "error adding symbols: Archive has no index; run ranlib to add one".