summaryrefslogtreecommitdiff
path: root/ELF/Symbols.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/Symbols.cpp')
-rw-r--r--ELF/Symbols.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ELF/Symbols.cpp b/ELF/Symbols.cpp
index 72bcff4e0f4d..f3edafaf4b78 100644
--- a/ELF/Symbols.cpp
+++ b/ELF/Symbols.cpp
@@ -202,6 +202,10 @@ void SymbolBody::parseSymbolVersion() {
// Truncate the symbol name so that it doesn't include the version string.
Name = {S.data(), Pos};
+ // If this is an undefined or shared symbol it is not a definition.
+ if (isUndefined() || isShared())
+ return;
+
// '@@' in a symbol name means the default version.
// It is usually the most recent one.
bool IsDefault = (Verstr[0] == '@');