[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 17:29:56 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.
>
> What if we have another symbol (which is may or may not be imported) whose name is `fd_write`? Then if a user specifies `fd_write`, does that point to the symbol with that name or this symbol whose import name is `fd_write`? Is this even possible?
Both would get printed. The point is to trace any and all occurrence of the symbol as they pertain the global symbol table.
https://github.com/llvm/llvm-project/pull/96119
More information about the llvm-commits
mailing list