[llvm] [WebAssembly] Add symbol information for shared libraries (PR #75238)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 17:46:29 PST 2023


dschuff wrote:

The way you have it written here, a symbol table will be built up automatically anytime the exports section is parsed, and then cleared and recreated automatically anytime a symbol table is parsed. Is there any case where we would want this create to always be implicit? In the prototype I had for creating a symbol table from the name section, I made it an explicit method on WasmObjectFile, so that users like nm could "opt in" to the kind of symbol table they wanted (e.g. if there was no symbols after the initial parse, try adding symbols from the name section, and failing that, fall back to exports). I guess if every consumer of WasmObjectFile wants the same behavior, it seems ok to make it implicit. I would think that the linker at least would not want to use symbol information unless it came from a real symbol table, so maybe we need to at least make it possible to detect the source of the symbols.

https://github.com/llvm/llvm-project/pull/75238


More information about the llvm-commits mailing list