[lld] [lld][WebAssembly] Allow `--trace-symbol` to work with symbols with custom import names (PR #96119)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 10:12:41 PDT 2024


sbc100 wrote:

> * Is the intention to print the import name, not the internal name in tracing?

Yes exactly.   Imagine I have a symbols called `__internal_fd_write` which is imported as `fd_write` (i.e. the symbol `__internal_fd_write` has an import name of `fd_write`.

Prior to this change, if a user links with `--trace-symbol=fd_write` they would see no output when this import is used.

After this change they would see a report of `fd_write` being undefined/imported in a certain object file.

> * `traceImport` seems to be added to `addUndefined[Function|Global|Tag]` but not `addUndefinedData`. Does `addUndefinedData` not need the tracing?

No that now not intended it should used anywhere an importName can exist.  I'll see if I overlooked that.



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


More information about the llvm-commits mailing list