summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Symbols.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Symbols.h')
-rw-r--r--lld/ELF/Symbols.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 97235222635..f8b5f463ba2 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -167,7 +167,7 @@ public:
BitcodeFile *file() { return (BitcodeFile *)this->File; }
};
-class DefinedCommon : public Defined {
+template <class ELFT> class DefinedCommon : public Defined {
public:
DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment, uint8_t StOther,
uint8_t Type, InputFile *File);
@@ -178,12 +178,15 @@ public:
// The output offset of this common symbol in the output bss. Computed by the
// writer.
- uint64_t OffsetInBss;
+ uint64_t Offset;
// The maximum alignment we have seen for this symbol.
uint64_t Alignment;
uint64_t Size;
+
+ // Virtual input section for common symbols.
+ CommonInputSection<ELFT> *Section;
};
// Regular defined symbols read from object file symbol tables.
@@ -433,7 +436,8 @@ struct Symbol {
// assume that the size and alignment of ELF64LE symbols is sufficient for any
// ELFT, and we verify this with the static_asserts in replaceBody.
llvm::AlignedCharArrayUnion<
- DefinedBitcode, DefinedCommon, DefinedRegular<llvm::object::ELF64LE>,
+ DefinedBitcode, DefinedCommon<llvm::object::ELF64LE>,
+ DefinedRegular<llvm::object::ELF64LE>,
DefinedSynthetic<llvm::object::ELF64LE>, Undefined,
SharedSymbol<llvm::object::ELF64LE>, LazyArchive, LazyObject>
Body;
OpenPOWER on IntegriCloud