@@ -552,17 +552,17 @@ struct Ctx {
552
552
553
553
// These variables are initialized by Writer and should not be used before
554
554
// Writer is initialized.
555
- uint8_t *bufferStart;
556
- Partition *mainPart;
557
- PhdrEntry *tlsPhdr;
555
+ uint8_t *bufferStart = nullptr ;
556
+ Partition *mainPart = nullptr ;
557
+ PhdrEntry *tlsPhdr = nullptr ;
558
558
struct OutSections {
559
559
OutputSection *elfHeader;
560
560
OutputSection *programHeaders;
561
561
OutputSection *preinitArray;
562
562
OutputSection *initArray;
563
563
OutputSection *finiArray;
564
564
};
565
- OutSections out;
565
+ OutSections out{} ;
566
566
SmallVector<OutputSection *, 0 > outputSections;
567
567
std::vector<Partition> partitions;
568
568
@@ -606,7 +606,7 @@ struct Ctx {
606
606
// _TLS_MODULE_BASE_ on targets that support TLSDESC.
607
607
Defined *tlsModuleBase;
608
608
};
609
- ElfSym sym;
609
+ ElfSym sym{} ;
610
610
std::unique_ptr<SymbolTable> symtab;
611
611
612
612
SmallVector<std::unique_ptr<MemoryBuffer>> memoryBuffers;
@@ -637,7 +637,7 @@ struct Ctx {
637
637
// archive.
638
638
std::unique_ptr<llvm::TarWriter> tar;
639
639
// InputFile for linker created symbols with no source location.
640
- InputFile *internalFile;
640
+ InputFile *internalFile = nullptr ;
641
641
// True if SHT_LLVM_SYMPART is used.
642
642
std::atomic<bool > hasSympart{false };
643
643
// True if there are TLS IE relocations. Set DF_STATIC_TLS if -shared.
@@ -646,7 +646,7 @@ struct Ctx {
646
646
std::atomic<bool > needsTlsLd{false };
647
647
// True if all native vtable symbols have corresponding type info symbols
648
648
// during LTO.
649
- bool ltoAllVtablesHaveTypeInfos;
649
+ bool ltoAllVtablesHaveTypeInfos = false ;
650
650
651
651
// Each symbol assignment and DEFINED(sym) reference is assigned an increasing
652
652
// order. Each DEFINED(sym) evaluation checks whether the reference happens
0 commit comments