Lines Matching refs:Sec
187 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() local
188 writeSectionInLoadCommand<MachO::section>(*Sec, Begin); in writeLoadCommands()
197 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() local
198 writeSectionInLoadCommand<MachO::section_64>(*Sec, Begin); in writeLoadCommands()
234 void MachOWriter::writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out) { in writeSectionInLoadCommand() argument
236 assert(Sec.Segname.size() <= sizeof(Temp.segname) && "too long segment name"); in writeSectionInLoadCommand()
237 assert(Sec.Sectname.size() <= sizeof(Temp.sectname) && in writeSectionInLoadCommand()
240 memcpy(Temp.segname, Sec.Segname.data(), Sec.Segname.size()); in writeSectionInLoadCommand()
241 memcpy(Temp.sectname, Sec.Sectname.data(), Sec.Sectname.size()); in writeSectionInLoadCommand()
242 Temp.addr = Sec.Addr; in writeSectionInLoadCommand()
243 Temp.size = Sec.Size; in writeSectionInLoadCommand()
244 Temp.offset = Sec.Offset; in writeSectionInLoadCommand()
245 Temp.align = Sec.Align; in writeSectionInLoadCommand()
246 Temp.reloff = Sec.RelOff; in writeSectionInLoadCommand()
247 Temp.nreloc = Sec.NReloc; in writeSectionInLoadCommand()
248 Temp.flags = Sec.Flags; in writeSectionInLoadCommand()
249 Temp.reserved1 = Sec.Reserved1; in writeSectionInLoadCommand()
250 Temp.reserved2 = Sec.Reserved2; in writeSectionInLoadCommand()
260 for (const std::unique_ptr<Section> &Sec : LC.Sections) { in writeSections() local
261 if (!Sec->hasValidOffset()) { in writeSections()
262 assert((Sec->Offset == 0) && "Skipped section's offset must be zero"); in writeSections()
263 assert((Sec->isVirtualSection() || Sec->Size == 0) && in writeSections()
268 assert(Sec->Offset && "Section offset can not be zero"); in writeSections()
269 assert((Sec->Size == Sec->Content.size()) && "Incorrect section size"); in writeSections()
270 memcpy(Buf->getBufferStart() + Sec->Offset, Sec->Content.data(), in writeSections()
271 Sec->Content.size()); in writeSections()
272 for (size_t Index = 0; Index < Sec->Relocations.size(); ++Index) { in writeSections()
273 RelocationInfo RelocInfo = Sec->Relocations[Index]; in writeSections()
277 : (*RelocInfo.Sec)->Index; in writeSections()
283 memcpy(Buf->getBufferStart() + Sec->RelOff + in writeSections()