This is an archive of the discontinued LLVM Phabricator instance.

[RFC/WIP] Only look at the symbol table when resolving JIT symbols
AbandonedPublic

Authored by JDevlieghere on Aug 2 2021, 10:50 AM.

Details

Summary

When resolving missing symbols for the JIT, only look at the symbol table and skip the debug info. I can't think of a situation where we want to resolve a missing symbol foo to a symbol with a different symbol name, but named foo in the debug info. Because this isn't specified in the symbol context, we can't discriminate based on that, and IRExecutionUnit::FindInSymbols will pick the first matching symbol context with an external load address.

rdar://81241350

Diff Detail

Event Timeline

JDevlieghere requested review of this revision.Aug 2 2021, 10:50 AM
JDevlieghere created this revision.
JDevlieghere abandoned this revision.Aug 2 2021, 11:02 AM

Jim reminded me of static functions, which won't have a symbol, so this is actually pretty common.

Yeah, any symbol that isn't exported might not be in the symbol table, but it might have a mangled name in the debug info that we can easily lookup. Static function, non-exported classes/functions, static variables, etc.

That being said, in the IRExecutionUnit do we currently try and lookup using symbols only first? If we find something do we avoid touching debug info completely? If not, we should make a patch to do this.