Lines Matching refs:Sec
177 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() local
178 writeSectionInLoadCommand<MachO::section>(*Sec, Begin); in writeLoadCommands()
187 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() local
188 writeSectionInLoadCommand<MachO::section_64>(*Sec, Begin); in writeLoadCommands()
224 void MachOWriter::writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out) { in writeSectionInLoadCommand() argument
226 assert(Sec.Segname.size() <= sizeof(Temp.segname) && "too long segment name"); in writeSectionInLoadCommand()
227 assert(Sec.Sectname.size() <= sizeof(Temp.sectname) && in writeSectionInLoadCommand()
230 memcpy(Temp.segname, Sec.Segname.data(), Sec.Segname.size()); in writeSectionInLoadCommand()
231 memcpy(Temp.sectname, Sec.Sectname.data(), Sec.Sectname.size()); in writeSectionInLoadCommand()
232 Temp.addr = Sec.Addr; in writeSectionInLoadCommand()
233 Temp.size = Sec.Size; in writeSectionInLoadCommand()
234 Temp.offset = Sec.Offset; in writeSectionInLoadCommand()
235 Temp.align = Sec.Align; in writeSectionInLoadCommand()
236 Temp.reloff = Sec.RelOff; in writeSectionInLoadCommand()
237 Temp.nreloc = Sec.NReloc; in writeSectionInLoadCommand()
238 Temp.flags = Sec.Flags; in writeSectionInLoadCommand()
239 Temp.reserved1 = Sec.Reserved1; in writeSectionInLoadCommand()
240 Temp.reserved2 = Sec.Reserved2; in writeSectionInLoadCommand()
250 for (const std::unique_ptr<Section> &Sec : LC.Sections) { in writeSections() local
251 if (!Sec->hasValidOffset()) { in writeSections()
252 assert((Sec->Offset == 0) && "Skipped section's offset must be zero"); in writeSections()
253 assert((Sec->isVirtualSection() || Sec->Size == 0) && in writeSections()
258 assert(Sec->Offset && "Section offset can not be zero"); in writeSections()
259 assert((Sec->Size == Sec->Content.size()) && "Incorrect section size"); in writeSections()
260 memcpy(B.getBufferStart() + Sec->Offset, Sec->Content.data(), in writeSections()
261 Sec->Content.size()); in writeSections()
262 for (size_t Index = 0; Index < Sec->Relocations.size(); ++Index) { in writeSections()
263 RelocationInfo RelocInfo = Sec->Relocations[Index]; in writeSections()
267 : (*RelocInfo.Sec)->Index; in writeSections()
273 memcpy(B.getBufferStart() + Sec->RelOff + in writeSections()