return SectionKey{OutsecName, Flags, Alignment};
}
-OutputSectionFactory::OutputSectionFactory(
- std::vector<OutputSection *> &OutputSections)
- : OutputSections(OutputSections) {}
+OutputSectionFactory::OutputSectionFactory() {}
static uint64_t getIncompatibleFlags(uint64_t Flags) {
return Flags & (SHF_ALLOC | SHF_TLS);
// linker scripts.
class OutputSectionFactory {
public:
- OutputSectionFactory(std::vector<OutputSection *> &OutputSections);
+ OutputSectionFactory();
~OutputSectionFactory();
void addInputSec(InputSectionBase *IS, StringRef OutsecName);
private:
llvm::SmallDenseMap<SectionKey, OutputSection *> Map;
- std::vector<OutputSection *> &OutputSections;
};
uint64_t getHeaderSize();
std::unique_ptr<FileOutputBuffer> Buffer;
- OutputSectionFactory Factory{OutputSections};
+ OutputSectionFactory Factory;
void addRelIpltSymbols();
void addStartEndSymbols();