COFF: Fix local absolute symbols.
Absolute symbols were always handled as external symbols, so if two
or more object files define the same absolute symbol, they would
conflict even if the symbol is private to each file.
This patch fixes that bug.
llvm-svn: 240756
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index f616d4c..c54ccdd 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -198,7 +198,7 @@
// Skip special symbols.
if (Name == "@comp.id" || Name == "@feat.00")
return nullptr;
- return new (Alloc) DefinedAbsolute(Name, Sym.getValue());
+ return new (Alloc) DefinedAbsolute(Name, Sym);
}
if (Sym.getSectionNumber() == llvm::COFF::IMAGE_SYM_DEBUG)
return nullptr;