[Lldb-commits] [PATCH] D134518: [lldb][COFF] Skip forwarder export symbols in symtab

Alvin Wong via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 23 04:19:22 PDT 2022


alvinhochun added a comment.

In D134518#3811155 <https://reviews.llvm.org/D134518#3811155>, @mstorsjo wrote:

> In D134518#3811153 <https://reviews.llvm.org/D134518#3811153>, @labath wrote:
>
>> They may not be useful (at the moment), but if they're not actively causing harm (e.g. stopping some other feature from functioning, or if we're badly misrepresenting them in the symtab output), then I think we should keep them. You never know -- maybe someone will find a use for them.
>
> Hm, maybe, but they're just plain names even without an associated address? @alvinhochun If we keep them, do we need to adjust the code below to handle the fact that they're addressless?

Hmm I'm not sure how. They do have an address pointing to the forwarder string, but they are useless as it is now.

Mind that the DLL containing the forwarder export does not actually export the symbol. When another EXE or DLL imports the forwarder symbol, Windows sees that it is a forwarder and loads the forwarded target instead. Unless a real exported function is imported from this DLL, it isn't even loaded into the process (at least that's what I gather from Process Explorer's module search with "api-ms" -- DLLs using this as a prefix contains only forwarder symbols to ucrtbase.dll or other system DLLs).

If anyone wants to list these symbols they can always do it with `llvm-objdump`. (`llvm-readobj` isn't handling this right now but I will make a patch.)

In D134518#3811160 <https://reviews.llvm.org/D134518#3811160>, @labath wrote:

> Where is the "dll description string" that they point to? Could they be made to point to that?

The current symbol address is already pointing to it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134518/new/

https://reviews.llvm.org/D134518



More information about the lldb-commits mailing list