git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238317
91177308-0d34-0410-b5e6-
96231b3b80d8
const SectionIndexMapTy &SectionIndexMap,
const SectionOffsetsTy &SectionOffsets);
const SectionIndexMapTy &SectionIndexMap,
const SectionOffsetsTy &SectionOffsets);
- void writeSectionData(const MCAssembler &Asm, const MCSectionData &SD,
+ void writeSectionData(const MCAssembler &Asm, MCSection &Sec,
const MCAsmLayout &Layout);
void WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags,
const MCAsmLayout &Layout);
void WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags,
-void ELFObjectWriter::writeSectionData(const MCAssembler &Asm,
- const MCSectionData &SD,
+void ELFObjectWriter::writeSectionData(const MCAssembler &Asm, MCSection &Sec,
const MCAsmLayout &Layout) {
const MCAsmLayout &Layout) {
- MCSectionELF &Section = static_cast<MCSectionELF &>(SD.getSection());
+ MCSectionELF &Section = static_cast<MCSectionELF &>(Sec);
StringRef SectionName = Section.getSectionName();
// Compressing debug_frame requires handling alignment fragments which is
StringRef SectionName = Section.getSectionName();
// Compressing debug_frame requires handling alignment fragments which is
}
// Gather the uncompressed data from all the fragments.
}
// Gather the uncompressed data from all the fragments.
- const MCSectionData::FragmentListType &Fragments = SD.getFragmentList();
+ const MCSectionData::FragmentListType &Fragments = Section.getFragmentList();
SmallVector<char, 128> UncompressedData =
getUncompressedData(Layout, Fragments);
SmallVector<char, 128> UncompressedData =
getUncompressedData(Layout, Fragments);
SectionOffsetsTy SectionOffsets;
std::vector<MCSectionELF *> Groups;
std::vector<MCSectionELF *> Relocations;
SectionOffsetsTy SectionOffsets;
std::vector<MCSectionELF *> Groups;
std::vector<MCSectionELF *> Relocations;
- for (const MCSection &Sec : Asm) {
- const MCSectionELF &Section = static_cast<const MCSectionELF &>(Sec);
- const MCSectionData &SD = Section.getSectionData();
+ for (MCSection &Sec : Asm) {
+ MCSectionELF &Section = static_cast<MCSectionELF &>(Sec);
uint64_t Padding = OffsetToAlignment(OS.tell(), Section.getAlignment());
WriteZeros(Padding);
uint64_t Padding = OffsetToAlignment(OS.tell(), Section.getAlignment());
WriteZeros(Padding);
uint64_t SecStart = OS.tell();
const MCSymbol *SignatureSymbol = Section.getGroup();
uint64_t SecStart = OS.tell();
const MCSymbol *SignatureSymbol = Section.getGroup();
- writeSectionData(Asm, SD, Layout);
+ writeSectionData(Asm, Section, Layout);
uint64_t SecEnd = OS.tell();
SectionOffsets[&Section] = std::make_pair(SecStart, SecEnd);
uint64_t SecEnd = OS.tell();
SectionOffsets[&Section] = std::make_pair(SecStart, SecEnd);