summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-12-01 08:54:01 -0800
committerFangrui Song <i@maskray.me>2020-12-01 08:54:01 -0800
commit941e9336d092f0ccef35e0f425d97f7def5ed1b0 (patch)
tree39a4ab45c8bdcc3c37d881d9677c8cea759fcc53 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parenta5f95887d0f8d27f1c33f19944d0c1da66aef606 (diff)
[ELF] Make foo@@v1 resolve undefined foo@v1
The symbol resolution rules for versioned symbols are: * foo@@v1 (default version) resolves both undefined foo and foo@v1 * foo@v1 (non-default version) resolves undefined foo@v1 Note, foo@@v1 must be defined (the assembler errors if attempting to create an undefined foo@@v1). For defined foo@@v1 in a shared object, we call `SymbolTable::addSymbol` twice, one for foo and the other for foo@v1. We don't do the same for object files, so foo@@v1 defined in one object file incorrectly does not resolve a foo@v1 reference in another object file. This patch fixes the issue by reusing the --wrap code to redirect symbols in object files. This has to be done after processing input files because foo and foo@v1 are two separate symbols if we haven't seen foo@@v1. Add a helper `Symbol::getVersionSuffix` to retrieve the optional trailing `@...` or `@@...` from the possibly truncated symbol name. Depends on D92258 Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D92259
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions