Lines Matching refs:Sec
167 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() local
168 writeSectionInLoadCommand<MachO::section>(*Sec, Begin); in writeLoadCommands()
177 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() local
178 writeSectionInLoadCommand<MachO::section_64>(*Sec, Begin); in writeLoadCommands()
214 void MachOWriter::writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out) { in writeSectionInLoadCommand() argument
216 assert(Sec.Segname.size() <= sizeof(Temp.segname) && "too long segment name"); in writeSectionInLoadCommand()
217 assert(Sec.Sectname.size() <= sizeof(Temp.sectname) && in writeSectionInLoadCommand()
220 memcpy(Temp.segname, Sec.Segname.data(), Sec.Segname.size()); in writeSectionInLoadCommand()
221 memcpy(Temp.sectname, Sec.Sectname.data(), Sec.Sectname.size()); in writeSectionInLoadCommand()
222 Temp.addr = Sec.Addr; in writeSectionInLoadCommand()
223 Temp.size = Sec.Size; in writeSectionInLoadCommand()
224 Temp.offset = Sec.Offset; in writeSectionInLoadCommand()
225 Temp.align = Sec.Align; in writeSectionInLoadCommand()
226 Temp.reloff = Sec.RelOff; in writeSectionInLoadCommand()
227 Temp.nreloc = Sec.NReloc; in writeSectionInLoadCommand()
228 Temp.flags = Sec.Flags; in writeSectionInLoadCommand()
229 Temp.reserved1 = Sec.Reserved1; in writeSectionInLoadCommand()
230 Temp.reserved2 = Sec.Reserved2; in writeSectionInLoadCommand()
240 for (const std::unique_ptr<Section> &Sec : LC.Sections) { in writeSections() local
241 if (!Sec->hasValidOffset()) { in writeSections()
242 assert((Sec->Offset == 0) && "Skipped section's offset must be zero"); in writeSections()
243 assert((Sec->isVirtualSection() || Sec->Size == 0) && in writeSections()
248 assert(Sec->Offset && "Section offset can not be zero"); in writeSections()
249 assert((Sec->Size == Sec->Content.size()) && "Incorrect section size"); in writeSections()
250 memcpy(Buf->getBufferStart() + Sec->Offset, Sec->Content.data(), in writeSections()
251 Sec->Content.size()); in writeSections()
252 for (size_t Index = 0; Index < Sec->Relocations.size(); ++Index) { in writeSections()
253 RelocationInfo RelocInfo = Sec->Relocations[Index]; in writeSections()
257 : (*RelocInfo.Sec)->Index; in writeSections()
263 memcpy(Buf->getBufferStart() + Sec->RelOff + in writeSections()